Re: leds-pwm: issue in __led_pwm_set()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/28/2013 04:46 AM, Alexandre Belloni wrote:
On 27/09/2013 20:34, Alexandre Belloni wrote:

Ok, I tested that and it seems to be working fine.


One last question though. What about power management ?

For example, in pwm_bl, pwm_backlight_suspend calls:

     pwm_config(pb->pwm, 0, pb->period);
     pwm_disable(pb->pwm);

Which is fine because it will correctly set up the PWM to a low level.

OK.

Then, to disable the pwm itself and its clock, I suppose we would have
to define some pm_ops in atmel_pwm, am I right ?

Maybe the suspend/resume() can be handled by the PWM driver.
However, not every PWM consumer of atmel-pwm needs the PM code.
I think it would be better if those are handled by each the PWM consumer.

So we will have to be extra careful to correctly set a low level on the
pin at that time.

If you only care about the leds-pwm, then no additional handling is required. The LED subsystem provides a 'LED_CORE_SUSPENDRESUME' flag which enables the PM automatically. The brightness is set to 0 forcedly on the suspend, and the stored brightness is recovered on the resume.
The leds-pwm driver enables this flag.
On the suspend mode, pwm_config() and pwm_disable() are called in __led_pwm_set(). That's exactly what you need.

Best regards,
Milo

--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux