summaryrefslogtreecommitdiffstats
path: root/include/led.h
Commit message (Collapse)AuthorAgeFilesLines
* led-trigger: Allow multiple led triggers of the same typeSascha Hauer2017-03-301-1/+5
| | | | | | | | | | | | | | We used to have a static array of trigger types which, allows only one led per trigger. While this is enough for panic and heartbeat, it falls short when multiple leds are associated to the default-on trigger. The default-on trigger is used to turn on a led statically from devicetree and may be used multiple times. This patch reworks the led triggers so that a trigger struct is allocated dynamically when needed and put onto a list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: add blinking/flashing and led_blink_pattern interfaceSascha Hauer2017-03-301-0/+11
| | | | | | | | | | | | | | | So far blinking/flashing LEDs is only supported on led-trigger level. Even without triggers it useful to be able to blink/flash LEDs, so add this functionality to the LED core. A led_blink_pattern consists of a number of on and off-periods which are described in an array. Using such an array you can encode nearly every blink pattern you need. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: add missing includesAlexander Aring2016-01-071-0/+3
| | | | | | | | The led header use some parts which are missing when include the this header. This patch adds them. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: Fix led_gpio_rgb_unregister prototypeSascha Hauer2015-04-201-2/+2
| | | | | | | Analog to the other led_unregister prototypes this must take the LED type specific struct. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: Add default-on triggerSascha Hauer2014-03-031-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: move led_of_parse_trigger to coreSascha Hauer2014-03-031-0/+2
| | | | | | So that other LED drivers can use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led-gpio: add bicolor led supportJean-Christophe PLAGNIOL-VILLARD2012-11-191-0/+20
| | | | | | | those led can have 2 colors but one at a time otherwise they are black Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* LED: Add LED trigger supportSascha Hauer2010-12-201-0/+32
| | | | | | | This patch allows to associate LEDs with certain triggers, such as heartbeat or network activity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* LED: Add gpio LED supportSascha Hauer2010-12-201-0/+43
| | | | | | This patch adds support for registering gpios as LEDs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* basic LED supportSascha Hauer2010-12-201-0/+27
This patch adds core functionality for controlling LEDs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>