diff options
| author | Mark Brown <broonie@kernel.org> | 2014-11-26 20:37:57 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2014-11-26 20:37:57 +0000 |
| commit | cf2394f70cf7774a107fbaa1ef5010db4bd69baa (patch) | |
| tree | e79e3e479d04213a67ecd47b31c7db648b0313c2 /include/linux/leds.h | |
| parent | 45fc84c668ba6cc08cbae74042be838bf9283d98 (diff) | |
| parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) | |
| download | lwn-cf2394f70cf7774a107fbaa1ef5010db4bd69baa.tar.gz lwn-cf2394f70cf7774a107fbaa1ef5010db4bd69baa.zip | |
Merge tag 'v3.18-rc4' into regulator-max77802
Linux 3.18-rc4
Diffstat (limited to 'include/linux/leds.h')
| -rw-r--r-- | include/linux/leds.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index e43686472197..a57611d0c94e 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -13,8 +13,8 @@ #define __LINUX_LEDS_H_INCLUDED #include <linux/list.h> -#include <linux/spinlock.h> #include <linux/rwsem.h> +#include <linux/spinlock.h> #include <linux/timer.h> #include <linux/workqueue.h> @@ -31,8 +31,8 @@ enum led_brightness { struct led_classdev { const char *name; - int brightness; - int max_brightness; + enum led_brightness brightness; + enum led_brightness max_brightness; int flags; /* Lower 16 bits reflect status */ @@ -140,6 +140,16 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev, */ extern void led_set_brightness(struct led_classdev *led_cdev, enum led_brightness brightness); +/** + * led_update_brightness - update LED brightness + * @led_cdev: the LED to query + * + * Get an LED's current brightness and update led_cdev->brightness + * member with the obtained value. + * + * Returns: 0 on success or negative error value on failure + */ +extern int led_update_brightness(struct led_classdev *led_cdev); /* * LED Triggers |
