OSDN Git Service

nfc: s3fwrn5: Remove the delay for NFC sleep
authorBongsu Jeon <bongsu.jeon@samsung.com>
Tue, 15 Dec 2020 06:54:00 +0000 (15:54 +0900)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Dec 2020 21:09:35 +0000 (13:09 -0800)
Remove the delay for NFC sleep because the delay is only needed to
guarantee that the NFC is awake.

Signed-off-by: Bongsu Jeon <bongsu.jeon@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/nfc/s3fwrn5/phy_common.c

index 497b02b..8131847 100644 (file)
@@ -20,7 +20,8 @@ void s3fwrn5_phy_set_wake(void *phy_id, bool wake)
 
        mutex_lock(&phy->mutex);
        gpio_set_value(phy->gpio_fw_wake, wake);
-       msleep(S3FWRN5_EN_WAIT_TIME);
+       if (wake)
+               msleep(S3FWRN5_EN_WAIT_TIME);
        mutex_unlock(&phy->mutex);
 }
 EXPORT_SYMBOL(s3fwrn5_phy_set_wake);