summaryrefslogtreecommitdiffstats
path: root/drivers/led
Commit message (Collapse)AuthorAgeFilesLines
* led: gpio: Free GPIOs on unregister()Sebastian Hesselbarth2015-04-201-0/+6
| | | | | | | | Free requested GPIOs on unregistration of mono-, bi-, and tri-color GPIO leds. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: Fix led_gpio_rgb_unregister prototypeSascha Hauer2015-04-201-1/+1
| | | | | | | 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: gpio: Properly deal with deferred probingSebastian Hesselbarth2015-04-171-4/+26
| | | | | | | | | | GPIO LEDs can suffer from deferred probing due to failing gpio request. Instead of registering each gpio led independently, pre-allocate an array of struct gpio_led for all and tear it down properly if probing of one leds fails. While at it, silence error messages on -EPROBE_DEFER. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: gpio: add support for default-state dt-propertyHubert Feurstein2015-03-041-0/+8
| | | | | | | This patch adds support for the default-state device tree property. Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: trigger: Turn of flashing leds only onceSascha Hauer2014-10-081-1/+4
| | | | | | | The current code continuously turns leds off. Preserve the current led status so that we only turn it off once. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: trigger: use max_value to turn on led instead of hardcoded '1'Sascha Hauer2014-10-081-2/+2
| | | | | | For PWM LEDs '1' may be really dark. Use max_value instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-08-071-1/+5
|\ | | | | | | | | Conflicts: lib/Makefile
| * led: try to get LED's label from the 'label' propertyAntony Pavlov2014-07-291-1/+5
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | led: triggers: fix "no previous prototype for 'trigger_init'" warningAntony Pavlov2014-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | Here is compiler's message: drivers/led/led-triggers.c:148:5: warning: no previous prototype for 'trigger_init' [-Wmissing-prototypes] int trigger_init(void) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | led: triggers: fix crash on disabling "default-on" triggerAntony Pavlov2014-07-311-1/+1
|/ | | | | | | | | | | | | | | | | | Here is a sample crash log on Ritmix RZX-50: barebox:/ trigger 0: panic 1: heartbeat 2: net rx 3: net tx 4: net 5: default on (led 0) barebox:/ trigger -d 5 ... Ooops, TLB miss on store! Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: Add default-on triggerSascha Hauer2014-03-032-0/+4
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: Add pwm-led driverSascha Hauer2014-03-033-0/+98
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: move led_of_parse_trigger to coreSascha Hauer2014-03-032-35/+34
| | | | | | So that other LED drivers can use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: trigger: disable LEDs with trigger before installing itSebastian Hesselbarth2013-11-111-1/+3
| | | | | | | | | This disables LEDs that have a trigger function assigned right before the trigger is installed. As the trigger was parsed before the LED has been registered, also swap LED registration and trigger parsing. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: gpio: Add trigger supportSascha Hauer2013-07-101-0/+33
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* LED: add support for device tree parsing of gpio-ledsSebastian Hesselbarth2013-07-092-0/+49
| | | | | | | | This adds a driver option to probe GPIO LEDs from device tree compatible with "gpio-leds" device tree nodes. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: test for led->set callback before calling itSascha Hauer2013-01-141-0/+3
| | | | | | | | Registering a LED can fail. If someone calls led_set for such a LED no set function will be there. Fail gracefully in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led-gpio: use gpio_request and gpio_freeJean-Christophe PLAGNIOL-VILLARD2013-01-021-4/+63
| | | | | | | So we can ensure a gpio is not used for something else Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led-gpio: add bicolor led supportJean-Christophe PLAGNIOL-VILLARD2012-11-192-0/+51
| | | | | | | 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>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-173-12/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* led: remove gpio includeSascha Hauer2012-07-251-1/+0
| | | | | | | The LED core itself does not need gpio support, so remove include so that it compiles on architectures without gpio support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* LED: Add LED trigger supportSascha Hauer2010-12-203-0/+161
| | | | | | | 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-203-0/+103
| | | | | | This patch adds support for registering gpios as LEDs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* basic LED supportSascha Hauer2010-12-203-0/+164
This patch adds core functionality for controlling LEDs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>