Commit Graph

53 Commits

Author SHA1 Message Date
David Brownell 199fb21d52 leds: bugfixes for leds-gpio
Three bugfixes to the leds-gpio driver, plus minor whitespace tweaks:

 - Do the INIT_WORK() before registering each LED, so if its trigger
   becomes immediately active it can schedule work without oopsing..

 - Use normal registration, not platform_driver_probe(), so that
   devices appearing "late" (hotplug type) can still be bound.

 - Mark the driver remove code as "__devexit", preventing oopses
   when the underlying device is removed.

These issues came up when using this driver with some GPIO expanders
living on serial busses, which act unlike "normal" platform devices:
they can appear and vanish along with the serial bus driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-11-05 21:54:41 +00:00
David Brownell 00852279af leds: Teach leds-gpio to handle timer-unsafe GPIOs
Teach the new leds-gpio driver that some GPIOs can't be accessed from
timer callbacks ... which is how all today's standard triggers use them.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-07-16 01:15:50 +01:00
Raphael Assenat 22e03f3b58 leds: Add generic GPIO LED driver
This patch adds support for GPIO connected leds via the new GPIO framework.

Information about leds (gpio, polarity, name, default trigger) is passed
to the driver via platform_data.

Signed-off-by: Raphael Assenat <raph@8d.com>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2007-07-16 01:15:50 +01:00