mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
leds: leds-pwm: add DT support for LEDs wired to supply
The non-DT driver allowed an active low property to be specified, but DT is missing this in its description. Add the property to the DT binding document, making it optional. It defaults to active high, which retains compatibility with existing descriptions. This should only be used for causes where the LED is wired to supply, and the PWM does not sensibly support its own inversion. Signed-off-by: Russell King <[email protected]> Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
parent
d19a8a7078
commit
b0571e7e4e
2 changed files with 3 additions and 0 deletions
|
|
@ -154,6 +154,7 @@ static int led_pwm_create_of(struct device *dev, struct led_pwm_priv *priv)
|
|||
|
||||
led.default_trigger = of_get_property(child,
|
||||
"linux,default-trigger", NULL);
|
||||
led.active_low = of_property_read_bool(child, "active-low");
|
||||
of_property_read_u32(child, "max-brightness",
|
||||
&led.max_brightness);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue