aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 17:50:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 17:50:57 -0400
commitc7c8518498e82591d7784452f5674c3aeb4d079c (patch)
tree790ff7e6b6741daf32ec686b9a302b957b07c0f4 /drivers/leds
parentece236ce2fad9c27a6fd2530f899289025194bce (diff)
parent591567a5ea25852f20b7ef2953f6f72020121199 (diff)
Merge branch 'gpio/next' of git://git.secretlab.ca/git/linux-2.6
* 'gpio/next' of git://git.secretlab.ca/git/linux-2.6: (61 commits) gpio/mxc/mxs: fix build error introduced by the irq_gc_ack() renaming mcp23s08: add i2c support mcp23s08: isolate spi specific parts mcp23s08: get rid of setup/teardown callbacks gpio/tegra: dt: add binding for gpio polarity mcp23s08: remove unused work queue gpio/da9052: remove a redundant assignment for gpio->da9052 gpio/mxc: add device tree probe support ARM: mxc: use ARCH_NR_GPIOS to define gpio number gpio/mxc: get rid of the uses of cpu_is_mx() gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables gpio: Move mpc5200 gpio driver to drivers/gpio GPIO: DA9052 GPIO module v3 gpio/tegra: Use engineering names in DT compatible property of/gpio: Add new method for getting gpios under different property names gpio/dt: Refine GPIO device tree binding gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err gpio/pca953x: Deprecate meaningless device-tree bindings gpio/pca953x: Remove dynamic platform data pointer gpio/pca953x: Fix IRQ support. ...
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/Kconfig19
-rw-r--r--drivers/leds/leds-gpio.c6
2 files changed, 4 insertions, 21 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 713d43b4e563..6c21c2986ca1 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -92,7 +92,7 @@ config LEDS_NET48XX
92config LEDS_NET5501 92config LEDS_NET5501
93 tristate "LED Support for Soekris net5501 series Error LED" 93 tristate "LED Support for Soekris net5501 series Error LED"
94 depends on LEDS_TRIGGERS 94 depends on LEDS_TRIGGERS
95 depends on X86 && LEDS_GPIO_PLATFORM && GPIO_CS5535 95 depends on X86 && GPIO_CS5535
96 select LEDS_TRIGGER_DEFAULT_ON 96 select LEDS_TRIGGER_DEFAULT_ON
97 default n 97 default n
98 help 98 help
@@ -182,23 +182,6 @@ config LEDS_GPIO
182 defined as platform devices and/or OpenFirmware platform devices. 182 defined as platform devices and/or OpenFirmware platform devices.
183 The code to use these bindings can be selected below. 183 The code to use these bindings can be selected below.
184 184
185config LEDS_GPIO_PLATFORM
186 bool "Platform device bindings for GPIO LEDs"
187 depends on LEDS_GPIO
188 default y
189 help
190 Let the leds-gpio driver drive LEDs which have been defined as
191 platform devices. If you don't know what this means, say yes.
192
193config LEDS_GPIO_OF
194 bool "OpenFirmware platform device bindings for GPIO LEDs"
195 depends on LEDS_GPIO && OF_DEVICE
196 default y
197 help
198 Let the leds-gpio driver drive LEDs which have been defined as
199 of_platform devices. For instance, LEDs which are listed in a "dts"
200 file.
201
202config LEDS_LP3944 185config LEDS_LP3944
203 tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip" 186 tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip"
204 depends on LEDS_CLASS 187 depends on LEDS_CLASS
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index b0480c8fbcbf..3d8bc327a68d 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -165,7 +165,7 @@ static inline int sizeof_gpio_leds_priv(int num_leds)
165} 165}
166 166
167/* Code to create from OpenFirmware platform devices */ 167/* Code to create from OpenFirmware platform devices */
168#ifdef CONFIG_LEDS_GPIO_OF 168#ifdef CONFIG_OF_GPIO
169static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_device *pdev) 169static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_device *pdev)
170{ 170{
171 struct device_node *np = pdev->dev.of_node, *child; 171 struct device_node *np = pdev->dev.of_node, *child;
@@ -223,13 +223,13 @@ static const struct of_device_id of_gpio_leds_match[] = {
223 { .compatible = "gpio-leds", }, 223 { .compatible = "gpio-leds", },
224 {}, 224 {},
225}; 225};
226#else 226#else /* CONFIG_OF_GPIO */
227static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_device *pdev) 227static struct gpio_leds_priv * __devinit gpio_leds_create_of(struct platform_device *pdev)
228{ 228{
229 return NULL; 229 return NULL;
230} 230}
231#define of_gpio_leds_match NULL 231#define of_gpio_leds_match NULL
232#endif 232#endif /* CONFIG_OF_GPIO */
233 233
234 234
235static int __devinit gpio_led_probe(struct platform_device *pdev) 235static int __devinit gpio_led_probe(struct platform_device *pdev)