diff mbox series

pwm: bcm2835: Fix NPD in suspend/resume

Message ID 20231113164632.2439400-1-florian.fainelli@broadcom.com (mailing list archive)
State New, archived
Headers show
Series pwm: bcm2835: Fix NPD in suspend/resume | expand

Commit Message

Florian Fainelli Nov. 13, 2023, 4:46 p.m. UTC
When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was
sent out on October 11th,, there was still a call to
platform_set_drvdata() which would ensure that the driver private data
structure could be used in bcm2835_pwm_{suspend,resume}.

A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835:
Simplify using devm functions") removed that call which would now cause
a NPD in bcm2835_pwm_{suspend,resume} as a consequence.

Fixes: 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 drivers/pwm/pwm-bcm2835.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Uwe Kleine-König Nov. 13, 2023, 8:53 p.m. UTC | #1
Hello,

On Mon, Nov 13, 2023 at 08:46:32AM -0800, Florian Fainelli wrote:
> When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was
> sent out on October 11th,, there was still a call to
> platform_set_drvdata() which would ensure that the driver private data
> structure could be used in bcm2835_pwm_{suspend,resume}.
> 
> A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835:
> Simplify using devm functions") removed that call which would now cause
> a NPD in bcm2835_pwm_{suspend,resume} as a consequence.
> 
> Fixes: 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume")
> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>

oops, indeed.

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Best regards
Uwe
Thierry Reding Nov. 28, 2023, 5:49 p.m. UTC | #2
On Mon, 13 Nov 2023 08:46:32 -0800, Florian Fainelli wrote:
> When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was
> sent out on October 11th,, there was still a call to
> platform_set_drvdata() which would ensure that the driver private data
> structure could be used in bcm2835_pwm_{suspend,resume}.
> 
> A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835:
> Simplify using devm functions") removed that call which would now cause
> a NPD in bcm2835_pwm_{suspend,resume} as a consequence.
> 
> [...]

Applied, thanks!

[1/1] pwm: bcm2835: Fix NPD in suspend/resume
      commit: fba7e9f839d7fcb0888094697da45c5668226455

Best regards,
Uwe Kleine-König Nov. 28, 2023, 8:55 p.m. UTC | #3
On Tue, Nov 28, 2023 at 06:49:22PM +0100, Thierry Reding wrote:
> 
> On Mon, 13 Nov 2023 08:46:32 -0800, Florian Fainelli wrote:
> > When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was
> > sent out on October 11th,, there was still a call to
> > platform_set_drvdata() which would ensure that the driver private data
> > structure could be used in bcm2835_pwm_{suspend,resume}.
> > 
> > A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835:
> > Simplify using devm functions") removed that call which would now cause
> > a NPD in bcm2835_pwm_{suspend,resume} as a consequence.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] pwm: bcm2835: Fix NPD in suspend/resume
>       commit: fba7e9f839d7fcb0888094697da45c5668226455

This one should IMHO go into v6.7. Do you intend to send it to Linus
during the current cycle?

Best regards
Uwe
Uwe Kleine-König Nov. 30, 2023, 6:13 a.m. UTC | #4
Hello Thierry,

On Tue, Nov 28, 2023 at 09:55:48PM +0100, Uwe Kleine-König wrote:
> On Tue, Nov 28, 2023 at 06:49:22PM +0100, Thierry Reding wrote:
> > 
> > On Mon, 13 Nov 2023 08:46:32 -0800, Florian Fainelli wrote:
> > > When 119a508c4dc9 ("pwm: bcm2835: Add support for suspend/resume") was
> > > sent out on October 11th,, there was still a call to
> > > platform_set_drvdata() which would ensure that the driver private data
> > > structure could be used in bcm2835_pwm_{suspend,resume}.
> > > 
> > > A cleanup now merged as commit commit 2ce7b7f6704c ("pwm: bcm2835:
> > > Simplify using devm functions") removed that call which would now cause
> > > a NPD in bcm2835_pwm_{suspend,resume} as a consequence.
> > > 
> > > [...]
> > 
> > Applied, thanks!
> > 
> > [1/1] pwm: bcm2835: Fix NPD in suspend/resume
> >       commit: fba7e9f839d7fcb0888094697da45c5668226455
> 
> This one should IMHO go into v6.7. Do you intend to send it to Linus
> during the current cycle?

We know since > 2 weeks now that the pwm-bcm2835 driver is broken in
v6.7-rc1 and there is a fix since day 0.

If you continue to be silent about this (here and at
https://lore.kernel.org/linux-pwm/20231121112029.gyv3gqirlycysyr4@pengutronix.de)
I intend to send a PR to Linus with this fix on Friday next week.

Best regards
Uwe
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 9777babd5b95..ab30667f4f95 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -155,6 +155,8 @@  static int bcm2835_pwm_probe(struct platform_device *pdev)
 	pc->chip.ops = &bcm2835_pwm_ops;
 	pc->chip.npwm = 2;
 
+	platform_set_drvdata(pdev, pc);
+
 	ret = devm_pwmchip_add(&pdev->dev, &pc->chip);
 	if (ret < 0)
 		return dev_err_probe(&pdev->dev, ret,