From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/13] PXA: PalmTC: Add gpio-leds and vibrator support
Date: Fri, 13 Aug 2010 06:32:38 +0200 [thread overview]
Message-ID: <1281673964-2119-7-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1281673964-2119-1-git-send-email-marek.vasut@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
arch/arm/mach-pxa/palmtc.c | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 9c74ce9..ccefc4e 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -390,6 +390,46 @@ static inline void palmtc_ts_init(void) {}
#endif
/******************************************************************************
+ * LEDs
+ ******************************************************************************/
+#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
+struct gpio_led palmtc_gpio_leds[] = {
+{
+ .name = "palmtc:green:user",
+ .default_trigger = "none",
+ .gpio = GPIO_NR_PALMTC_LED_POWER,
+ .active_low = 1,
+}, {
+ .name = "palmtc:vibra:vibra",
+ .default_trigger = "none",
+ .gpio = GPIO_NR_PALMTC_VIBRA_POWER,
+ .active_low = 1,
+}
+
+};
+
+static struct gpio_led_platform_data palmtc_gpio_led_info = {
+ .leds = palmtc_gpio_leds,
+ .num_leds = ARRAY_SIZE(palmtc_gpio_leds),
+};
+
+static struct platform_device palmtc_leds = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &palmtc_gpio_led_info,
+ }
+};
+
+static void __init palmtc_leds_init(void)
+{
+ platform_device_register(&palmtc_leds);
+}
+#else
+static inline void palmtc_leds_init(void) {}
+#endif
+
+/******************************************************************************
* NOR Flash
******************************************************************************/
#if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
@@ -502,6 +542,7 @@ static void __init palmtc_init(void)
palmtc_ts_init();
palmtc_nor_init();
palmtc_lcd_init();
+ palmtc_leds_init();
};
MACHINE_START(PALMTC, "Palm Tungsten|C")
--
1.7.1
next prev parent reply other threads:[~2010-08-13 4:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-13 4:32 [PATCH 01/13] Balloon3: Disperse MFP config Marek Vasut
2010-08-13 4:32 ` [PATCH 02/13] PXA: Vpac270: Fix gpio_power for MMC Marek Vasut
2010-08-13 4:32 ` [PATCH 03/13] PXA: PalmTC: Modularize Palm Tungsten|C Marek Vasut
2010-08-13 4:32 ` [PATCH 04/13] UCB1400: Pass ucb1400-gpio data through ac97 bus Marek Vasut
2010-08-13 4:32 ` [PATCH 05/13] PXA: Vpac270: Correct touch IRQ passing to UCB1400 Marek Vasut
2010-08-13 4:32 ` [PATCH 06/13] PXA: PalmTC: Pass GPIO offset to ucb1400-gpio Marek Vasut
2010-08-13 4:32 ` Marek Vasut [this message]
2010-08-13 4:32 ` [PATCH 08/13] PXA: Colibri: Toradex Colibri PXA270 CF support Marek Vasut
2010-08-18 11:43 ` Daniel Mack
2010-08-21 6:22 ` Marek Vasut
2010-08-21 9:33 ` Daniel Mack
2010-09-01 7:23 ` Russell King - ARM Linux
2010-09-01 12:39 ` Marek Vasut
2010-08-13 4:32 ` [PATCH 09/13] PXA: Colibri: Push evalboard MFP into module files Marek Vasut
2010-08-13 4:32 ` [PATCH 10/13] PXA: Colibri: Add M41T00 RTC support Marek Vasut
2010-08-13 4:32 ` [PATCH 11/13] PXA: Colibri: Rename Colibri-evalboard Marek Vasut
2010-08-13 4:32 ` [PATCH 12/13] pxa2xx/pcmcia: Prepare for pxa320 Marek Vasut
2010-08-13 4:32 ` [PATCH 13/13] PXA: Colibri PXA320 PCMCIA driver Marek Vasut
2010-08-18 4:11 ` [PATCH 01/13] Balloon3: Disperse MFP config Eric Miao
2010-08-18 5:05 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1281673964-2119-7-git-send-email-marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.