mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
leds: Add support for hardware accelerated LED flashing
Extends the leds subsystem with a blink_set() callback function which can be optionally implemented by a LED driver. If implemented, the driver can use the hardware acceleration for blinking a LED. Signed-off-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
This commit is contained in:
parent
6c152beefb
commit
4c79141d28
4 changed files with 67 additions and 9 deletions
|
@ -38,6 +38,11 @@ struct led_classdev {
|
|||
void (*brightness_set)(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness);
|
||||
|
||||
/* Activate hardware accelerated blink */
|
||||
int (*blink_set)(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
|
||||
struct device *dev;
|
||||
struct list_head node; /* LED Device list */
|
||||
char *default_trigger; /* Trigger to use */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue