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
Showing the changes to include/linux (1 of 9 files). Show all
Unified · Split
| @@ -218,6 +218,19 @@ extern int led_set_brightness_sync(struct led_classdev *led_cdev, · 217 unmodified lines | ||
| 218 | 218 | */ |
| 219 | 219 | extern int led_update_brightness(struct led_classdev *led_cdev); |
| 220 | 220 | |
| 221 | +/** | |
| 222 | + * led_get_default_pattern - return default pattern | |
| 223 | + * | |
| 224 | + * @led_cdev: the LED to get default pattern for | |
| 225 | + * @size: pointer for storing the number of elements in returned array, | |
| 226 | + * modified only if return != NULL | |
| 227 | + * | |
| 228 | + * Return: Allocated array of integers with default pattern from device tree | |
| 229 | + * or NULL. Caller is responsible for kfree(). | |
| 230 | + */ | |
| 231 | +extern u32 *led_get_default_pattern(struct led_classdev *led_cdev, | |
| 232 | + unsigned int *size); | |
| 233 | + | |
| 221 | 234 | /** |
| 222 | 235 | * led_sysfs_disable - disable LED sysfs interface |
| 223 | 236 | * @led_cdev: the LED to set |