scsi: ufs: add PM notifier support for UFS card
If the removable UFS card is removed or inserted when UFS host is doing
system PM, the card detect routine may run into race condition with host
suspend/resume.
In order to avoid these race conditions, this change adds the PM notifier
support for UFS card to monitor system PM events. Before enter suspend,
unregister the UFS card detect notifier from extcon and cancel card detect
work if any. After exit suspend, register the card detect notifier back to
extcon and sync extcon state to schedule card detect work.
Change-Id: I504d793e7c7809454a597ec3bdc91b6b217bb180
Signed-off-by:
Can Guo <cang@codeaurora.org>
Loading
Please register or sign in to comment