[PATCH] Add pca9532 led driver

Previous thread: Re: [PATCH] Add pca9532 platform data for Thecus N2100 by Andrew Morton on Tuesday, April 29, 2008 - 4:26 pm. (9 messages)

Next thread: [git pull] kmemcheck by Ingo Molnar on Tuesday, April 29, 2008 - 4:34 pm. (4 messages)
To: <rpurdie@...>, <linux-kernel@...>, <akpm@...>, <tbm@...>
Date: Tuesday, April 29, 2008 - 4:08 pm

NXP pca9532 is a LED dimmer/controller attached to i2c bus.
It allows attaching upto 16 leds which can either be on, off
or dimmed and/or blinked with the two PWM modulators available.

This driver is a "new-style" i2c driver that adheres to the
driver model and implements the led framework api. Since the
leds connected to driver are platform specific, it is only
usefull when platform data is passed to the driver to define
what leds are connected to which pins.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
drivers/leds/Kconfig | 8 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-pca9532.c | 327 ++++++++++++++++++++++++++++++++++++++++++
include/linux/leds-pca9532.h | 45 ++++++
4 files changed, 381 insertions(+), 0 deletions(-)
create mode 100644 drivers/leds/leds-pca9532.c
create mode 100644 include/linux/leds-pca9532.h

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 86a369b..1c35dfa 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -103,6 +103,14 @@ config LEDS_HP6XX
This option enables led support for the handheld
HP Jornada 620/660/680/690.

+config LEDS_PCA9532
+ tristate "LED driver for PCA9532 dimmer"
+ depends on LEDS_CLASS && I2C && INPUT && EXPERIMENTAL
+ help
+ This option enables support for NXP pca9532
+ led controller. It is generally only usefull
+ as a platform driver
+
config LEDS_GPIO
tristate "LED Support for GPIO connected LEDs"
depends on LEDS_CLASS && GENERIC_GPIO
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index 973d626..7156f99 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
+obj-$(CONFIG_LEDS_PCA9532) += leds-pca9532.o
obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
obj-$(CONFIG_LEDS_CM...

Previous thread: Re: [PATCH] Add pca9532 platform data for Thecus N2100 by Andrew Morton on Tuesday, April 29, 2008 - 4:26 pm. (9 messages)

Next thread: [git pull] kmemcheck by Ingo Molnar on Tuesday, April 29, 2008 - 4:34 pm. (4 messages)