diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2019-01-09 15:44:46 +0100 |
---|---|---|
committer | Jacek Anaszewski <jacek.anaszewski@gmail.com> | 2019-01-16 22:08:07 +0100 |
commit | 8e1f456129e61371fb190c71ea182a9f6e21282e (patch) | |
tree | c8bd7b1c9b5ff1301d832dd546064cd24ba4d7d6 /include/linux/leds.h | |
parent | 1dd7093742517b4aa362d22eaff8eef133d876ce (diff) |
leds: Add helper for getting default pattern from Device Tree
Multiple LED triggers might need to access default pattern so add a
helper for that.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Diffstat (limited to 'include/linux/leds.h')
-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 * |