diff options
author | Jacek Anaszewski <j.anaszewski@samsung.com> | 2014-11-14 11:50:18 +0100 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2014-11-14 23:29:35 +0100 |
commit | 4d71a4a12b130ad033219e6f58c74a64059415eb (patch) | |
tree | 5b9560719835c5a204b92f4bb7e44aae6793281c /drivers/leds/trigger/ledtrig-oneshot.c | |
parent | leds: implement sysfs interface locking mechanism (diff) | |
download | linux-4d71a4a12b130ad033219e6f58c74a64059415eb.tar.xz linux-4d71a4a12b130ad033219e6f58c74a64059415eb.zip |
leds: Add support for setting brightness in a synchronous way
There are use cases when setting a LED brightness has to
have immediate effect (e.g. setting a torch LED brightness).
This patch extends LED subsystem to support such operations.
The LED subsystem internal API __led_set_brightness is changed
to led_set_brightness_async and new led_set_brightness_sync API
is added.
Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/trigger/ledtrig-oneshot.c')
-rw-r--r-- | drivers/leds/trigger/ledtrig-oneshot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/trigger/ledtrig-oneshot.c b/drivers/leds/trigger/ledtrig-oneshot.c index cb4c7466692a..fbd02cdc3ad7 100644 --- a/drivers/leds/trigger/ledtrig-oneshot.c +++ b/drivers/leds/trigger/ledtrig-oneshot.c @@ -63,9 +63,9 @@ static ssize_t led_invert_store(struct device *dev, oneshot_data->invert = !!state; if (oneshot_data->invert) - __led_set_brightness(led_cdev, LED_FULL); + led_set_brightness_async(led_cdev, LED_FULL); else - __led_set_brightness(led_cdev, LED_OFF); + led_set_brightness_async(led_cdev, LED_OFF); return size; } |