diff options
author | Linus Torvalds | 2018-10-23 08:55:03 +0100 |
---|---|---|
committer | Linus Torvalds | 2018-10-23 08:55:03 +0100 |
commit | 6fd577cd4b257ce5cb761adcdedeea55501d84d9 (patch) | |
tree | 017101c3dd83b6173031eac9a57f8498d0258419 /include/linux | |
parent | 114b5f8f7efc036dd7dd16efb0f218a88e6c6c02 (diff) | |
parent | 8dbac65f5c181e4723586ab738b703bb23bc3f2a (diff) |
Merge tag 'leds-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED updates from Jacek Anaszewski:
"We introduce LED pattern trigger - the idea that was proposed three
years ago now received enough attention and determination to drive it
to the successful end.
There is also one new LED class driver and couple of improvements to
the existing ones.
New LED class driver:
- add support for Panasonic AN30259A with related DT bindings
New LED trigger:
- introduce LED pattern trigger
leds-sc27xx-bltc:
- implement pattern_set/clear ops to enable support for pattern
trigger's hw_pattern sysfs file
Improvements to existing LED class drivers:
- leds-pwm: don't print error message on -EPROBE_DEFER
- leds-gpio: try to lookup gpiod from device
- leds-as3645a: convert to using %pOFn instead of device_node.name"
* tag 'leds-for-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds:
leds: sc27xx: Add pattern_set/clear interfaces for LED controller
leds: core: Introduce LED pattern trigger
leds: add Panasonic AN30259A support
dt-bindings: leds: document Panasonic AN30259A bindings
leds: gpio: Try to lookup gpiod from device
leds: pwm: silently error out on EPROBE_DEFER
leds: Convert to using %pOFn instead of device_node.name
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/leds.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/leds.h b/include/linux/leds.h index 834683d603f9..7393a316d9fa 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -22,6 +22,7 @@ #include <linux/workqueue.h> struct device; +struct led_pattern; /* * LED Core */ @@ -88,6 +89,10 @@ struct led_classdev { unsigned long *delay_on, unsigned long *delay_off); + int (*pattern_set)(struct led_classdev *led_cdev, + struct led_pattern *pattern, u32 len, int repeat); + int (*pattern_clear)(struct led_classdev *led_cdev); + struct device *dev; const struct attribute_group **groups; @@ -472,4 +477,14 @@ static inline void led_classdev_notify_brightness_hw_changed( struct led_classdev *led_cdev, enum led_brightness brightness) { } #endif +/** + * struct led_pattern - pattern interval settings + * @delta_t: pattern interval delay, in milliseconds + * @brightness: pattern interval brightness + */ +struct led_pattern { + u32 delta_t; + int brightness; +}; + #endif /* __LINUX_LEDS_H_INCLUDED */ |