pxa/hx4700: Add ASIC3 LED support
Subsystems (3)
PATCH 1/1 pxa/hx4700: Add ASIC3 LED support
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.
---
This part of the HTC ASIC3 LED driver patch set was seemingly dropped, hence repost.
arch/arm/mach-pxa/hx4700.c +16 -0
@@ -280,6 +280,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 +325,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 = {
PATCH 1/1 pxa/hx4700: Add ASIC3 LED support
Quoted 17 lines · 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 <[email protected]>---
This part of the HTC ASIC3 LED driver patch set was seemingly dropped, hence repost.
arch/arm/mach-pxa/hx4700.c ? ?2011-06-22 10:43:18.986382990 +0100 renamed from arch/arm/mach-pxa/hx4700.c ? ?2011-06-21 04:25:46.000000000 +0100 +4
-0@@ -280,6 +280,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",
arch/arm/mach-pxa/hx4700.c ? ?2011-06-22 10:43:18.986382990 +0100 static u16 asic3_gpio_config[] = { · line 296
Quoted 10 lines
arch/arm/mach-pxa/hx4700.c ? ?2011-06-22 10:43:18.986382990 +0100 renamed from arch/arm/mach-pxa/hx4700.c ? ?2011-06-21 04:25:46.000000000 +0100 +10
-0+ ? ? ? }, + ? ? ? [1] = { + ? ? ? ? ? ? ? .name = "hx4700:green", + ? ? ? ? ? ? ? .default_trigger = "unused", + ? ? ? }, + ? ? ? [2] = { + ? ? ? ? ? ? ? .name = "hx4700:blue", + ? ? ? ? ? ? ? .default_trigger = "hx4700-radio", + ? ? ? }, +};
Can't you use the generic LED driver instead? See an example here:
http://git.pengutronix.de/?p=imx/linux-2.6.git;a=commitdiff;h=cf1738dad02f22781ae1f08414634086fc613d81
Regards,
Fabio Estevam
PATCH 1/1 pxa/hx4700: Add ASIC3 LED support
On Wed, Jun 22, 2011 at 4:44 PM, Fabio Estevam <[email protected]> wrote:
..
Quoted 2 lines
Can't you use the generic LED driver instead? See an example here:
http://git.pengutronix.de/?p=imx/linux-2.6.git;a=commitdiff;h=cf1738dad02f22781ae1f08414634086fc613d81
Sorry, in your case it is not LED controlled via GPIO, so my previous does not apply.
Regards,
Fabio Estevam
PATCH 1/1 pxa/hx4700: Add ASIC3 LED support
In reply to Paul ParsonsAm Mittwoch, den 22.06.2011, 19:31 +0000 schrieb Paul Parsons:
Quoted 33 lines
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 <[email protected]>---
This part of the HTC ASIC3 LED driver patch set was seemingly dropped, hence repost.
arch/arm/mach-pxa/hx4700.c +15
-0@@ -280,6 +280,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 ] = {
arch/arm/mach-pxa/hx4700.c static struct asic3_platform_data asic3_ · line 331
Quoted 7 lines
arch/arm/mach-pxa/hx4700.c +1
-0@@ -310,6 +325,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 = {
regards
Philipp
PATCH 1/1 pxa/hx4700: Add ASIC3 LED support
Quoted 39 lines · Philipp Zabel
Am Mittwoch, den 22.06.2011, 19:31 +0000 schrieb Paul Parsons:
Quoted 38 lines
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 <[email protected]>---
This part of the HTC ASIC3 LED driver patch set was seemingly dropped, hence repost.
arch/arm/mach-pxa/hx4700.c ?2011-06-22 10:43:18.986382990 +0100 renamed from arch/arm/mach-pxa/hx4700.c ?2011-06-21 04:25:46.000000000 +0100 +15
-0@@ -280,6 +280,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] = {arch/arm/mach-pxa/hx4700.c ?2011-06-22 10:43:18.986382990 +0100 renamed from arch/arm/mach-pxa/hx4700.c ?2011-06-21 04:25:46.000000000 +0100 +1
-0@@ -310,6 +325,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, ?};
Quoted 8 lines
arch/arm/mach-pxa/hx4700.c ?2011-06-22 10:43:18.986382990 +0100 static struct asic3_platform_data asic3_ · line 331
Quoted 2 lines
arch/arm/mach-pxa/hx4700.c ?2011-06-22 10:43:18.986382990 +0100 renamed from arch/arm/mach-pxa/hx4700.c ?2011-06-21 04:25:46.000000000 +0100 +0
-0?static struct platform_device asic3 = {Acked-by Philipp Zabel <[email protected]>regards
Philipp
Applied.
Thanks
Haojian