mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
leds: Add suspend/resume state flags to leds-gpio
Add an option to preserve LED state when suspending/resuming to the LED gpio driver. Based on a suggestion from Robert Jarzmik. Tested-by: Robert Jarzmik <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
This commit is contained in:
parent
41c42ff5db
commit
defb512d25
2 changed files with 4 additions and 2 deletions
|
|
@ -93,7 +93,8 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
|
|||
}
|
||||
led_dat->cdev.brightness_set = gpio_led_set;
|
||||
led_dat->cdev.brightness = LED_OFF;
|
||||
led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
|
||||
if (!template->retain_state_suspended)
|
||||
led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
|
||||
|
||||
ret = gpio_direction_output(led_dat->gpio, led_dat->active_low);
|
||||
if (ret < 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue