Commit Graph

4 Commits

Author SHA1 Message Date
Igor Grinberg 9dfdcdfed4 gpio_led: add support for inverted polarity
Some GPIO connected LEDs have inverted polarity.
Introduce new config option: CONFIG_GPIO_LED_INVERTED_TABLE for the
specifying the inverted GPIO LEDs list and add support for this in the
gpio_led driver.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Ilya Ledvich <ilya@compulab.co.il>
2013-11-25 10:41:52 -05:00
Igor Grinberg 6516f81b64 gpio_led: check gpio_request() return value
Add a check for the gpio_request() function return value and do not try
to configure the GPIO if the gpio_request() call fails.
Also, print an error message indicating the gpio_request() has failed.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Ilya Ledvich <ilya@compulab.co.il>
2013-11-25 10:41:52 -05:00
Thomas Chou ec3b498192 gpio_led: add gpio_request to __led_init
This patch adds the gpio usage request. The polarity is changed to
positive as suggested by Mike Frysinger.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-07-12 11:30:52 -04:00
Thomas Chou 3e6b86b555 misc: add gpio based status led driver
This patch adds a status led driver followed the GPIO access
conventions of Linux. The led mask is used to specify the gpio pin.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
2010-05-28 10:56:03 -04:00