Loading Documentation/devicetree/bindings/leds/leds-gpio.txt +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ LED sub-node properties: on). The "keep" setting will keep the LED at whatever its current state is, without producing a glitch. The default is off if this property is not present. - retain-state-suspended: (optional) Retain the LED status on suspending. Examples: Loading arch/arm/boot/dts/qcom/msm8916-qrd-skuh.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ label = "red"; linux,default-trigger = "battery-charging"; default-state = "off"; retain-state-suspended; }; green { Loading @@ -219,6 +220,7 @@ label = "green"; linux,default-trigger = "battery-full"; default-state = "off"; retain-state-suspended; }; blue { Loading drivers/leds/leds-gpio.c +4 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) led.default_state = LEDS_GPIO_DEFSTATE_OFF; } led.retain_state_suspended = (unsigned)of_property_read_bool(child, "retain-state-suspended"); ret = create_gpio_led(&led, &priv->leds[priv->num_leds++], &pdev->dev, NULL); if (ret < 0) { Loading Loading
Documentation/devicetree/bindings/leds/leds-gpio.txt +1 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ LED sub-node properties: on). The "keep" setting will keep the LED at whatever its current state is, without producing a glitch. The default is off if this property is not present. - retain-state-suspended: (optional) Retain the LED status on suspending. Examples: Loading
arch/arm/boot/dts/qcom/msm8916-qrd-skuh.dtsi +2 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ label = "red"; linux,default-trigger = "battery-charging"; default-state = "off"; retain-state-suspended; }; green { Loading @@ -219,6 +220,7 @@ label = "green"; linux,default-trigger = "battery-full"; default-state = "off"; retain-state-suspended; }; blue { Loading
drivers/leds/leds-gpio.c +4 −0 Original line number Diff line number Diff line Loading @@ -204,6 +204,10 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) led.default_state = LEDS_GPIO_DEFSTATE_OFF; } led.retain_state_suspended = (unsigned)of_property_read_bool(child, "retain-state-suspended"); ret = create_gpio_led(&led, &priv->leds[priv->num_leds++], &pdev->dev, NULL); if (ret < 0) { Loading