mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
leds: leds-gpio: add retain-state-suspended property
Some gpio-leds need retain the state even in suspend, such as charger led. But this property missed in devicetree, add it. ([email protected]: fold DT binding updates into this patch) Signed-off-by: Robin Gong <[email protected]> Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
parent
25c6579f87
commit
4270a78d23
2 changed files with 15 additions and 0 deletions
|
|
@ -204,6 +204,9 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
|
|||
led.default_state = LEDS_GPIO_DEFSTATE_OFF;
|
||||
}
|
||||
|
||||
if (of_get_property(child, "retain-state-suspended", NULL))
|
||||
led.retain_state_suspended = 1;
|
||||
|
||||
ret = create_gpio_led(&led, &priv->leds[priv->num_leds++],
|
||||
&pdev->dev, NULL);
|
||||
if (ret < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue