[lkml]   [2013]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/3] leds-pwm: Defer PWM calls if PWM can sleep

When using the leds-pwm module with external PWM chips connected through
I2C, the kernel will panic when settings a trigger. In this case, PWM
calls can sleep, and should be deferred.

Patch 1 and 2 add the necessary API to the PWM subsystem, and update
matching drivers.

Patch 3 updates leds-pwm to use a worker if the PWM chip can sleep, or performs
direct calls otherwise.

This patchset is based on the for-next branch of the led subsystem [1],
as patch 3 depends on the recent work of Peter for DT bindings in leds-pwm.
The pwm patches should probably follow the same path.

Tested on Overo (OMAP3 + TWL4030) with device tree.

Best regards,


[1] git://

Florian Vaussard (3):
pwm: Add pwm_cansleep() as exported API to users
pwm: Add can_sleep property to drivers
leds: leds-pwm: Defer led_pwm_set() if PWM can sleep

drivers/leds/leds-pwm.c | 45 +++++++++++++++++++++++++++++++++++++++------
drivers/pwm/core.c | 12 ++++++++++++
drivers/pwm/pwm-twl-led.c | 1 +
drivers/pwm/pwm-twl.c | 1 +
include/linux/pwm.h | 10 ++++++++++
5 files changed, 63 insertions(+), 6 deletions(-)


 \ /
  Last update: 2013-01-25 12:01    [W:0.079 / U:1.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site