Message ID | 20240821183717.163235-1-marex@denx.de |
---|---|
State | New |
Headers | show |
Series | wifi: wilc1000: Re-enable RTC clock on resume | expand |
On 8/21/24 20:36, Marek Vasut wrote: > The wilc_sdio_suspend() does clk_disable_unprepare() on rtc_clk clock, > make sure wilc_sdio_resume() does matching clk_prepare_enable(), else > any suspend/resume cycle leads to clock disable/enable imbalance. Fix > the imbalance. > > Signed-off-by: Marek Vasut <marex@denx.de> > --- > Cc: Ajay Singh <ajay.kathat@microchip.com> > Cc: Alexis Lothoré <alexis.lothore@bootlin.com> > Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev> > Cc: Kalle Valo <kvalo@kernel.org> > Cc: Marek Vasut <marex@denx.de> > Cc: linux-wireless@vger.kernel.org Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Marek Vasut <marex@denx.de> wrote: > The wilc_sdio_suspend() does clk_disable_unprepare() on rtc_clk clock, > make sure wilc_sdio_resume() does matching clk_prepare_enable(), else > any suspend/resume cycle leads to clock disable/enable imbalance. Fix > the imbalance. > > Signed-off-by: Marek Vasut <marex@denx.de> > Reviewed-by: Alexis Lothoré <alexis.lothore@bootlin.com> Patch applied to wireless-next.git, thanks. 0c896eceb5f3 wifi: wilc1000: Re-enable RTC clock on resume
diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c index 7999aeb76901f..683a35c682a8f 100644 --- a/drivers/net/wireless/microchip/wilc1000/sdio.c +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c @@ -1006,6 +1006,9 @@ static int wilc_sdio_resume(struct device *dev) if (!wilc->initialized) return 0; + if (!IS_ERR(wilc->rtc_clk)) + clk_prepare_enable(wilc->rtc_clk); + wilc_sdio_init(wilc, true); wilc_sdio_enable_interrupt(wilc);
The wilc_sdio_suspend() does clk_disable_unprepare() on rtc_clk clock, make sure wilc_sdio_resume() does matching clk_prepare_enable(), else any suspend/resume cycle leads to clock disable/enable imbalance. Fix the imbalance. Signed-off-by: Marek Vasut <marex@denx.de> --- Cc: Ajay Singh <ajay.kathat@microchip.com> Cc: Alexis Lothoré <alexis.lothore@bootlin.com> Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev> Cc: Kalle Valo <kvalo@kernel.org> Cc: Marek Vasut <marex@denx.de> Cc: linux-wireless@vger.kernel.org --- drivers/net/wireless/microchip/wilc1000/sdio.c | 3 +++ 1 file changed, 3 insertions(+)