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
This commit is contained in:
Linus Torvalds
2019-03-04 19:33:04 -08:00
9 changed files with 259 additions and 71 deletions

View File

@@ -218,6 +218,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