diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-04 19:33:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-03-04 19:33:04 -0800 |
commit | cd2a3bf02625ffad02a6b9f7df758ee36cf12769 (patch) | |
tree | 3eea69c80535c60bd421cf0c1273e05959cf9df5 /include | |
parent | 7629bac64204ff256d3b2415767a7acb1401047b (diff) | |
parent | 5ddb0869bfc1bca6cfc592c74c64a026f936638c (diff) | |
download | linux-cd2a3bf02625ffad02a6b9f7df758ee36cf12769.tar.bz2 |
Merge tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED updates from Jacek Anaszewski:
- finalize previously announced support for initialization of pattern
triggers from Device Tree
- fix for null deref on firmware load failure in leds-lp55xx-common.c
* tag 'leds-for-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
leds: lp55xx: fix null deref on firmware load failure
leds: trigger: timer: Add initialization from Device Tree
leds: trigger: oneshot: Add initialization from Device Tree
leds: trigger: pattern: Add pattern initialization from Device Tree
leds: Add helper for getting default pattern from Device Tree
dt-bindings: leds: Add pattern initialization from Device Tree
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/leds.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index 5263f87e1d2c..78204650fe2a 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -219,6 +219,19 @@ extern int led_set_brightness_sync(struct led_classdev *led_cdev, extern int led_update_brightness(struct led_classdev *led_cdev); /** + * led_get_default_pattern - return default pattern + * + * @led_cdev: the LED to get default pattern for + * @size: pointer for storing the number of elements in returned array, + * modified only if return != NULL + * + * Return: Allocated array of integers with default pattern from device tree + * or NULL. Caller is responsible for kfree(). + */ +extern u32 *led_get_default_pattern(struct led_classdev *led_cdev, + unsigned int *size); + +/** * led_sysfs_disable - disable LED sysfs interface * @led_cdev: the LED to set * |