* [PATCH] pxa/hx4700: Add ASIC3 LED support
@ 2011-04-30 17:59 Paul Parsons
2011-05-03 10:15 ` Philipp Zabel
0 siblings, 1 reply; 2+ messages in thread
From: Paul Parsons @ 2011-04-30 17:59 UTC (permalink / raw)
To: linux-arm-kernel
Add LED support for the HTC ASIC3. Underlying support is provided by the mfd/asic3 and leds/leds-asic3 drivers. An example configuration is provided by the pxa/hx4700 platform.
Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
---
diff -uprN clean-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c linux-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c
--- clean-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c 2011-04-28 11:18:09.310551240 +0100
+++ linux-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c 2011-04-30 15:52:19.956069045 +0100
@@ -23,6 +23,7 @@
#include <linux/gpio_keys.h>
#include <linux/input.h>
#include <linux/lcd.h>
+#include <linux/leds.h>
#include <linux/mfd/htc-egpio.h>
#include <linux/mfd/asic3.h>
#include <linux/mtd/physmap.h>
@@ -280,6 +281,21 @@ static u16 asic3_gpio_config[] = {
ASIC3_GPIOD15_nPIOW,
};
+static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = {
+ [0] = {
+ .name = "hx4700:amber",
+ .default_trigger = "ds2760-battery.0-charging-blink-full-solid",
+ },
+ [1] = {
+ .name = "hx4700:green",
+ .default_trigger = "unused",
+ },
+ [2] = {
+ .name = "hx4700:blue",
+ .default_trigger = "hx4700-radio",
+ },
+};
+
static struct resource asic3_resources[] = {
/* GPIO part */
[0] = {
@@ -310,6 +326,7 @@ static struct asic3_platform_data asic3_
.gpio_config_num = ARRAY_SIZE(asic3_gpio_config),
.irq_base = IRQ_BOARD_START,
.gpio_base = HX4700_ASIC3_GPIO_BASE,
+ .leds = asic3_leds,
};
static struct platform_device asic3 = {
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] pxa/hx4700: Add ASIC3 LED support
2011-04-30 17:59 [PATCH] pxa/hx4700: Add ASIC3 LED support Paul Parsons
@ 2011-05-03 10:15 ` Philipp Zabel
0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2011-05-03 10:15 UTC (permalink / raw)
To: linux-arm-kernel
Am Samstag, den 30.04.2011, 17:59 +0000 schrieb Paul Parsons:
> Add LED support for the HTC ASIC3. Underlying support is provided by the mfd/asic3 and leds/leds-asic3 drivers. An example configuration is provided by the pxa/hx4700 platform.
>
> Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
> ---
> diff -uprN clean-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c linux-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c
> --- clean-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c 2011-04-28 11:18:09.310551240 +0100
> +++ linux-2.6.39-rc5/arch/arm/mach-pxa/hx4700.c 2011-04-30 15:52:19.956069045 +0100
> @@ -23,6 +23,7 @@
> #include <linux/gpio_keys.h>
> #include <linux/input.h>
> #include <linux/lcd.h>
> +#include <linux/leds.h>
This is not needed anymore.
> #include <linux/mfd/htc-egpio.h>
> #include <linux/mfd/asic3.h>
> #include <linux/mtd/physmap.h>
> @@ -280,6 +281,21 @@ static u16 asic3_gpio_config[] = {
> ASIC3_GPIOD15_nPIOW,
> };
>
> +static struct asic3_led asic3_leds[ASIC3_NUM_LEDS] = {
> + [0] = {
> + .name = "hx4700:amber",
> + .default_trigger = "ds2760-battery.0-charging-blink-full-solid",
> + },
> + [1] = {
> + .name = "hx4700:green",
> + .default_trigger = "unused",
> + },
> + [2] = {
> + .name = "hx4700:blue",
> + .default_trigger = "hx4700-radio",
> + },
> +};
> +
> static struct resource asic3_resources[] = {
> /* GPIO part */
> [0] = {
> @@ -310,6 +326,7 @@ static struct asic3_platform_data asic3_
> .gpio_config_num = ARRAY_SIZE(asic3_gpio_config),
> .irq_base = IRQ_BOARD_START,
> .gpio_base = HX4700_ASIC3_GPIO_BASE,
> + .leds = asic3_leds,
> };
>
> static struct platform_device asic3 = {
After removal of the superfluous include,
Acked-by: Philipp Zabel <philipp.zabel@gmail.com>
regards
Philipp
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-03 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-30 17:59 [PATCH] pxa/hx4700: Add ASIC3 LED support Paul Parsons
2011-05-03 10:15 ` Philipp Zabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).