LED updates for 4.20-rc1.
-----BEGIN PGP SIGNATURE-----
iJEEABYIADkWIQQUwxxKyE5l/npt8ARiEGxRG/Sl2wUCW84itBscamFjZWsuYW5h
c3pld3NraUBnbWFpbC5jb20ACgkQYhBsURv0pdspqAD/ReyRFRr0exC5QsNbXDIO
T6PpnvlQul8z28a4OurQuScA+wfB0Lmaby3p1VU/PGZK7BHkpyTtJOmjb92Wm02v
SgQE
=MxFu
-----END PGP SIGNATURE-----
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
This commit is contained in:
commit
6fd577cd4b
14 changed files with 1148 additions and 34 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue