leds: Add support for Philips PCA955x I2C LED drivers
PATCH v2 1/1 leds: Add support for Philips PCA955x I2C LED drivers
Quoted 1 line
From
64305461c086777470ae624c1bf3b8dc69e203a5Mon Sep 17 00:00:00 2001
From: Nate Case <[email protected]>
Date: Wed, 26 Mar 2008 16:36:33 -0500
Subject: [PATCH] leds: Add support for Philips PCA955x I2C LED drivers
This driver supports the PCA9550, PCA9551, PCA9552, and PCA9553 LED driver chips.
Signed-off-by Nate Case <[email protected]>
---
Note: This version incorporates the changes suggested by Andrew Morton
drivers/leds/Kconfig | 8 + drivers/leds/Makefile | 1 + drivers/leds/leds-pca955x.c | 401 +++++++++++++++++++++++++++++++++++++++++++ include/linux/leds.h | 14 ++ 4 files changed, 424 insertions(+), 0 deletions(-) create mode 100644 drivers/leds/leds-pca955x.c
drivers/leds/Kconfig +8 -0
@@ -147,6 +147,14 @@ config LEDS_CLEVO_MAIL To compile this driver as a module, choose M here: the module will be called leds-clevo-mail. +config LEDS_PCA955X + tristate "LED Support for PCA955x I2C chips" + depends on LEDS_CLASS && I2C + help + This option enables support for LEDs connected to PCA955x + LED driver chips accessed via the I2C bus. Supported + devices include PCA9550, PCA9551, PCA9552, and PCA9553. + comment "LED Triggers" config LEDS_TRIGGERS
drivers/leds/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-$(CONFIG_LEDS_CM_X270) += leds-cm-x270.o obj-$(CONFIG_LEDS_CLEVO_MAIL) += leds-clevo-mail.o obj-$(CONFIG_LEDS_HP6XX) += leds-hp6xx.o obj-$(CONFIG_LEDS_FSG) += leds-fsg.o +obj-$(CONFIG_LEDS_PCA955X) += leds-pca955x.o # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
drivers/leds/leds-pca955x.c new file +401 -0
401 lines not on this page · raw message
include/linux/leds.h +14 -0
@@ -118,6 +118,20 @@ extern void ledtrig_ide_activity(void);#define ledtrig_ide_activity () do {} while(0)#endif +/* +* Generic LED platform data for describing LED names and default triggers. +*/ +struct led_info { +const char *name; +char *default_trigger; +int flags; +}; + +struct led_platform_data { +int num_leds; +struct led_info *leds; +}; +/* For the leds-gpio driver */ struct gpio_led {const char *name;
Signature · 1 line
1.5.4.4