leds: call led_pwm_set() in leds-pwm to enforce default LED_OFF
authorMarkus Hofstaetter <markus.hofstaetter@ait.ac.at>
Wed, 11 Nov 2015 11:40:29 +0000 (12:40 +0100)
committerJacek Anaszewski <j.anaszewski@samsung.com>
Mon, 4 Jan 2016 08:57:36 +0000 (09:57 +0100)
commitf16703360da7731a057df2ffa902306819c22398
treebad958970dbfa9c83d2f079304efd8822ffed893
parentfb65ee94ee3ae8fde4922262f73dddea2172e3ef
leds: call led_pwm_set() in leds-pwm to enforce default LED_OFF

Some PWMs are disabled by default or the default pin setting
does not match the LED_OFF state (e.g., active-low leds).
Hence, the driver may end up reporting 0 brightness, but
the leds are actually on using full brightness, because
it never enforces its default configuration.
So enforce it by calling led_pwm_set() after successfully
registering the device.

Tested on a Phytec phyFLEX i.MX6Q board based on kernel
v3.19.5.

Signed-off-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at>
Tested-by: Markus Hofstaetter <markus.hofstaetter@ait.ac.at>
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
drivers/leds/leds-pwm.c