mfd: rtsx_usb: Defer autosuspend while card exists
authorRoger Tseng <rogerable@realtek.com>
Wed, 21 Jan 2015 10:09:21 +0000 (18:09 +0800)
committerLee Jones <lee.jones@linaro.org>
Thu, 22 Jan 2015 16:08:02 +0000 (16:08 +0000)
A card insertion happens after the lastest polling before reader is
suspended may never have a chance to be detected. Under current 1-HZ
polling interval setting in mmc_core, the worst case of such
undetectablility is about 1 second.

To further reduce the undetectability, detect card slot again in suspend
method and defer the autosuspend if the slot is loaded. The default 2
second autosuspend delay of USB subsystem should let the next polling
detects the card.

Signed-off-by: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

No differences found