Subject: [PATCH] pwm: mxs: set pwm_chip can_sleep flag

From: [email-masked] (Alexandre Belloni)
Date: Wed, 9 Apr 2014 01:16:54 +0200

Hi,

On 08/04/2014 at 18:53:43 +0200, Stefan Wahren wrote :
> i applied these 5 patches, but it doesn't fix the problem.
> 
> Here are my results for the pwm driver led on i.MX28:
> 
> version                  | trigger: none          | trigger: heartbeat
> -----------------------------------------------------------------------------
> 3.14                     | OK                     | NOT OK (WARNING, LED
> permanent on)
>   + shawn's patch        | OK                     | NOT OK (LED
> permanent on)
>     + russell's patches  | OK                     | NOT OK (LED
> permanent on)
>       + active-low       | NOT OK (inverse logic) | NOT OK (LED
> permanent on)
> 
> Russell's patches work as expected, but have not influence on the heartbeat.
> 

Yeah, I got it wrong or explained badly.

So, if without Russell's patches, your pwm is not inversed, then you would
have to set active_low and inverse the pwm.
If it was inversed, then you'll have to set active_low and let the pwm
with the normal polarity. I know this is a bit contrived but this was
exactly my point why we shouldn't call it active_low.

Can you try to switch the polarity when setting active_low ?

I'm not home, else I'll try on my i.mx28 boards...

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com