mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
leds: fix led-bd2802 errors while resuming
LED_CORE_SUSPENDRESUME flag is not needed in the bd2802 driver, because all works for suspend/resume is done in bd2802_suspend and bd2802_suspend functions. And this patch allows bd2802 to be configured again when it resumes from suspend. Signed-off-by: Kim Kyuwon <q1.kim@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
d888a4c76c
commit
b838901821
1 changed files with 1 additions and 7 deletions
|
@ -538,7 +538,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
|
|||
led->cdev_led1r.brightness = LED_OFF;
|
||||
led->cdev_led1r.brightness_set = bd2802_set_led1r_brightness;
|
||||
led->cdev_led1r.blink_set = bd2802_set_led1r_blink;
|
||||
led->cdev_led1r.flags |= LED_CORE_SUSPENDRESUME;
|
||||
|
||||
ret = led_classdev_register(&led->client->dev, &led->cdev_led1r);
|
||||
if (ret < 0) {
|
||||
|
@ -551,7 +550,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
|
|||
led->cdev_led1g.brightness = LED_OFF;
|
||||
led->cdev_led1g.brightness_set = bd2802_set_led1g_brightness;
|
||||
led->cdev_led1g.blink_set = bd2802_set_led1g_blink;
|
||||
led->cdev_led1g.flags |= LED_CORE_SUSPENDRESUME;
|
||||
|
||||
ret = led_classdev_register(&led->client->dev, &led->cdev_led1g);
|
||||
if (ret < 0) {
|
||||
|
@ -564,7 +562,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
|
|||
led->cdev_led1b.brightness = LED_OFF;
|
||||
led->cdev_led1b.brightness_set = bd2802_set_led1b_brightness;
|
||||
led->cdev_led1b.blink_set = bd2802_set_led1b_blink;
|
||||
led->cdev_led1b.flags |= LED_CORE_SUSPENDRESUME;
|
||||
|
||||
ret = led_classdev_register(&led->client->dev, &led->cdev_led1b);
|
||||
if (ret < 0) {
|
||||
|
@ -577,7 +574,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
|
|||
led->cdev_led2r.brightness = LED_OFF;
|
||||
led->cdev_led2r.brightness_set = bd2802_set_led2r_brightness;
|
||||
led->cdev_led2r.blink_set = bd2802_set_led2r_blink;
|
||||
led->cdev_led2r.flags |= LED_CORE_SUSPENDRESUME;
|
||||
|
||||
ret = led_classdev_register(&led->client->dev, &led->cdev_led2r);
|
||||
if (ret < 0) {
|
||||
|
@ -590,7 +586,6 @@ static int bd2802_register_led_classdev(struct bd2802_led *led)
|
|||
led->cdev_led2g.brightness = LED_OFF;
|
||||
led->cdev_led2g.brightness_set = bd2802_set_led2g_brightness;
|
||||
led->cdev_led2g.blink_set = bd2802_set_led2g_blink;
|
||||
led->cdev_led2g.flags |= LED_CORE_SUSPENDRESUME;
|
||||
|
||||
ret = led_classdev_register(&led->client->dev, &led->cdev_led2g);
|
||||
if (ret < 0) {
|
||||
|
@ -723,8 +718,7 @@ static int bd2802_resume(struct i2c_client *client)
|
|||
struct bd2802_led *led = i2c_get_clientdata(client);
|
||||
|
||||
if (!bd2802_is_all_off(led) || led->adf_on) {
|
||||
gpio_set_value(led->pdata->reset_gpio, 1);
|
||||
udelay(100);
|
||||
bd2802_reset_cancel(led);
|
||||
bd2802_restore_state(led);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue