]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: wilc1000: Keep slot powered on during suspend/resume
authorMarek Vasut <marex@denx.de>
Thu, 26 Sep 2024 19:50:55 +0000 (21:50 +0200)
committerKalle Valo <kvalo@kernel.org>
Thu, 17 Oct 2024 16:47:13 +0000 (19:47 +0300)
The WILC3000 can suspend and enter low power state. According to local
measurements, the WILC3000 consumes the same amount of power if the slot
is powered up and WILC3000 is suspended, and if the WILC3000 is powered
off. Use the former option, keep the WILC3000 powered up as that allows
for things like WoWlan to work.

Note that this is tested on WILC3000 only, not on WILC1000 .

Signed-off-by: Marek Vasut <marex@denx.de>
Tested-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240926195113.2823392-1-marex@denx.de
drivers/net/wireless/microchip/wilc1000/sdio.c

index b4da05d5a498a0e997a5c3bad4094ea95d2c6b6a..d67662b6b2a1aec7758bd6b8d8151bd1dc4d6b45 100644 (file)
@@ -969,7 +969,6 @@ static int wilc_sdio_suspend(struct device *dev)
 {
        struct sdio_func *func = dev_to_sdio_func(dev);
        struct wilc *wilc = sdio_get_drvdata(func);
-       int ret;
 
        dev_info(dev, "sdio suspend\n");
 
@@ -983,13 +982,7 @@ static int wilc_sdio_suspend(struct device *dev)
 
        wilc_sdio_disable_interrupt(wilc);
 
-       ret = wilc_sdio_reset(wilc);
-       if (ret) {
-               dev_err(&func->dev, "Fail reset sdio\n");
-               return ret;
-       }
-
-       return 0;
+       return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
 }
 
 static int wilc_sdio_resume(struct device *dev)