* [PATCH RESEND] pwm: brcmstb: Don't set can_sleep flag
@ 2015-11-24 6:43 Axel Lin
2015-11-24 16:27 ` Thierry Reding
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-11-24 6:43 UTC (permalink / raw)
To: Thierry Reding; +Cc: Brian Norris, Gregory Fong, Florian Fainelli, linux-pwm
The .can_sleep flag is used for some PWM controllers that can't be used
in atomic context. Not such case for this driver, so don't set the
can_sleep flag.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Brian Norris <computersforpeace@gmail.com>
---
This patch was sent on http://www.spinics.net/lists/linux-pwm/msg03506.html
drivers/pwm/pwm-brcmstb.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c
index 423ce08..f58039b 100644
--- a/drivers/pwm/pwm-brcmstb.c
+++ b/drivers/pwm/pwm-brcmstb.c
@@ -270,7 +270,6 @@ static int brcmstb_pwm_probe(struct platform_device *pdev)
p->chip.ops = &brcmstb_pwm_ops;
p->chip.base = -1;
p->chip.npwm = 2;
- p->chip.can_sleep = true;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
p->base = devm_ioremap_resource(&pdev->dev, res);
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH RESEND] pwm: brcmstb: Don't set can_sleep flag
2015-11-24 6:43 [PATCH RESEND] pwm: brcmstb: Don't set can_sleep flag Axel Lin
@ 2015-11-24 16:27 ` Thierry Reding
0 siblings, 0 replies; 2+ messages in thread
From: Thierry Reding @ 2015-11-24 16:27 UTC (permalink / raw)
To: Axel Lin; +Cc: Brian Norris, Gregory Fong, Florian Fainelli, linux-pwm
[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]
On Tue, Nov 24, 2015 at 02:43:12PM +0800, Axel Lin wrote:
> The .can_sleep flag is used for some PWM controllers that can't be used
> in atomic context. Not such case for this driver, so don't set the
> can_sleep flag.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> Reviewed-by: Brian Norris <computersforpeace@gmail.com>
> ---
> This patch was sent on http://www.spinics.net/lists/linux-pwm/msg03506.html
>
> drivers/pwm/pwm-brcmstb.c | 1 -
> 1 file changed, 1 deletion(-)
There's some discussion currently about marking all drivers can_sleep
and modify all users to cope with it correctly. The reason is that we
introduced a mutex in pwm_enable() and pwm_set_polarity() which means
that PWM devices effectively can't be used from interrupt or atomic
contexts.
It also means that the driver is actually currently correct, so I'd
like to leave it as-is until the users have been sorted out, at which
point we can simply get rid of can_sleep.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-24 16:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-24 6:43 [PATCH RESEND] pwm: brcmstb: Don't set can_sleep flag Axel Lin
2015-11-24 16:27 ` Thierry Reding
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).