Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 06eef38e authored by Can Guo's avatar Can Guo
Browse files

scsi: ufs: add support to double check the presence of UFS card



When UFS card is removed, as the extcon gpio has a debounce delay, the
state of the card is not updated simultaneously. If the presence of
UFS card is critical to decide if errors are caused by card removal in some
paths, such as error handler path, it would be not enough just check its
state. This change adds one func to check the presence of the UFS card. If
the state of the card is offline, then return false. If the state says
online then sleep 300ms, which is longer than the extcon gpio debounce
delay, then check the state again, if state is changed, it means the card
is removed.

Change-Id: I246d7444497793f55999bb9618612ade40bd36b5
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
parent cf8acfa8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment