All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
@ 2023-10-04 17:54 ` Florian Fainelli
  0 siblings, 0 replies; 6+ messages in thread
From: Florian Fainelli @ 2023-10-04 17:54 UTC (permalink / raw)
  To: linux-pwm
  Cc: Florian Fainelli, Thierry Reding, Uwe Kleine-König,
	Broadcom internal kernel review list,
	moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE, open list

[-- Attachment #1: Type: text/plain, Size: 1042 bytes --]

The suspend/resume functions currently utilize
clk_disable()/clk_enable() respectively which may be no-ops with certain
clock providers such as SCMI. Fix this to use clk_disable_unprepare()
and clk_prepare_enable() respectively as we should.

Fixes: 3a9f5957020f ("pwm: Add Broadcom BCM7038 PWM controller support")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/pwm/pwm-brcmstb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c
index a3faa9a3de7c..a7d529bf76ad 100644
--- a/drivers/pwm/pwm-brcmstb.c
+++ b/drivers/pwm/pwm-brcmstb.c
@@ -288,7 +288,7 @@ static int brcmstb_pwm_suspend(struct device *dev)
 {
 	struct brcmstb_pwm *p = dev_get_drvdata(dev);
 
-	clk_disable(p->clk);
+	clk_disable_unprepare(p->clk);
 
 	return 0;
 }
@@ -297,7 +297,7 @@ static int brcmstb_pwm_resume(struct device *dev)
 {
 	struct brcmstb_pwm *p = dev_get_drvdata(dev);
 
-	clk_enable(p->clk);
+	clk_prepare_enable(p->clk);
 
 	return 0;
 }
-- 
2.34.1


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-12 13:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-04 17:54 [PATCH] pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume Florian Fainelli
2023-10-04 17:54 ` Florian Fainelli
2023-10-05  6:20 ` Uwe Kleine-König
2023-10-05  6:20   ` Uwe Kleine-König
2023-10-12 13:55 ` Thierry Reding
2023-10-12 13:55   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.