* [PATCH v2] omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
@ 2008-05-31 0:59 Koen Kooi
2008-06-10 21:23 ` Koen Kooi
0 siblings, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2008-05-31 0:59 UTC (permalink / raw)
To: linux-omap; +Cc: Koen Kooi
From: Koen Kooi <koen@openembedded.org>
omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
* on revision A5 and earlier board the two leds can't be controlled seperately, should be fixed in rev. B and C boards.
Changes since v1: indented structs with tabs
Signed-off-by: Koen Kooi <koen@openembedded.org>
---
arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index c992cc7..83891fc 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -19,6 +19,7 @@
#include <linux/err.h>
#include <linux/clk.h>
#include <linux/io.h>
+#include <linux/leds.h>
#include <asm/hardware.h>
#include <asm/mach-types.h>
@@ -72,6 +73,32 @@ static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
.ctrl_name = "internal",
};
+struct gpio_led gpio_leds[] = {
+ {
+ .name = "beagleboard::led0",
+ .default_trigger = "none",
+ .gpio = 149,
+ },
+ {
+ .name = "beagleboard::led1",
+ .default_trigger = "none",
+ .gpio = 150,
+ },
+};
+
+static struct gpio_led_platform_data gpio_led_info = {
+ .leds = gpio_leds,
+ .num_leds = ARRAY_SIZE(gpio_leds),
+};
+
+static struct platform_device leds_gpio = {
+ .name = "leds-gpio",
+ .id = -1,
+ .dev = {
+ .platform_data = &gpio_led_info,
+ },
+};
+
static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
{ OMAP_TAG_UART, &omap3_beagle_uart_config },
{ OMAP_TAG_MMC, &omap3beagle_mmc_config },
@@ -83,6 +110,7 @@ static struct platform_device *omap3_beagle_devices[] __initdata = {
#ifdef CONFIG_RTC_DRV_TWL4030
&omap3_beagle_twl4030rtc_device,
#endif
+ &leds_gpio,
};
static void __init omap3_beagle_init(void)
--
1.5.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
2008-05-31 0:59 [PATCH v2] omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver Koen Kooi
@ 2008-06-10 21:23 ` Koen Kooi
2008-06-10 21:31 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Koen Kooi @ 2008-06-10 21:23 UTC (permalink / raw)
To: linux-omap
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Op 31 mei 2008, om 02:59 heeft Koen Kooi het volgende geschreven:
> From: Koen Kooi <koen@openembedded.org>
>
> omap3beagle: add a platform device to hook up the GPIO leds to the
> leds-gpio driver
> * on revision A5 and earlier board the two leds can't be controlled
> seperately, should be fixed in rev. B and C boards.
>
> Changes since v1: indented structs with tabs
>
> Signed-off-by: Koen Kooi <koen@openembedded.org>
Any objections against applying this patch?
>
> ---
> arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++
> ++++++
> 1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
> omap2/board-omap3beagle.c
> index c992cc7..83891fc 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -19,6 +19,7 @@
> #include <linux/err.h>
> #include <linux/clk.h>
> #include <linux/io.h>
> +#include <linux/leds.h>
>
> #include <asm/hardware.h>
> #include <asm/mach-types.h>
> @@ -72,6 +73,32 @@ static struct omap_lcd_config
> omap3_beagle_lcd_config __initdata = {
> .ctrl_name = "internal",
> };
>
> +struct gpio_led gpio_leds[] = {
> + {
> + .name = "beagleboard::led0",
> + .default_trigger = "none",
> + .gpio = 149,
> + },
> + {
> + .name = "beagleboard::led1",
> + .default_trigger = "none",
> + .gpio = 150,
> + },
> +};
> +
> +static struct gpio_led_platform_data gpio_led_info = {
> + .leds = gpio_leds,
> + .num_leds = ARRAY_SIZE(gpio_leds),
> +};
> +
> +static struct platform_device leds_gpio = {
> + .name = "leds-gpio",
> + .id = -1,
> + .dev = {
> + .platform_data = &gpio_led_info,
> + },
> +};
> +
> static struct omap_board_config_kernel omap3_beagle_config[]
> __initdata = {
> { OMAP_TAG_UART, &omap3_beagle_uart_config },
> { OMAP_TAG_MMC, &omap3beagle_mmc_config },
> @@ -83,6 +110,7 @@ static struct platform_device
> *omap3_beagle_devices[] __initdata = {
> #ifdef CONFIG_RTC_DRV_TWL4030
> &omap3_beagle_twl4030rtc_device,
> #endif
> + &leds_gpio,
> };
>
> static void __init omap3_beagle_init(void)
> --
> 1.5.4.3
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFITvDlMkyGM64RGpERAuZiAJ98z/SmVIojeYFkeawMqnPxAyvzcACeIJwX
u+WuEQPKIZjh3aRskDG7UlU=
=7RQA
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
2008-06-10 21:23 ` Koen Kooi
@ 2008-06-10 21:31 ` Tony Lindgren
2008-06-11 0:49 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2008-06-10 21:31 UTC (permalink / raw)
To: Koen Kooi; +Cc: linux-omap
* Koen Kooi <k.kooi@student.utwente.nl> [080610 14:26]:
>
> Op 31 mei 2008, om 02:59 heeft Koen Kooi het volgende geschreven:
>
> > From: Koen Kooi <koen@openembedded.org>
> >
> > omap3beagle: add a platform device to hook up the GPIO leds to the
> > leds-gpio driver
> > * on revision A5 and earlier board the two leds can't be controlled
> > seperately, should be fixed in rev. B and C boards.
> >
> > Changes since v1: indented structs with tabs
> >
> > Signed-off-by: Koen Kooi <koen@openembedded.org>
>
>
> Any objections against applying this patch?
Nope, and blinking leds are always considered the highhest priority
patches ;) Pushing today.
Tony
>
>
>
>
> >
> > ---
> > arch/arm/mach-omap2/board-omap3beagle.c | 28 ++++++++++++++++++++++
> > ++++++
> > 1 files changed, 28 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
> > omap2/board-omap3beagle.c
> > index c992cc7..83891fc 100644
> > --- a/arch/arm/mach-omap2/board-omap3beagle.c
> > +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> > @@ -19,6 +19,7 @@
> > #include <linux/err.h>
> > #include <linux/clk.h>
> > #include <linux/io.h>
> > +#include <linux/leds.h>
> >
> > #include <asm/hardware.h>
> > #include <asm/mach-types.h>
> > @@ -72,6 +73,32 @@ static struct omap_lcd_config
> > omap3_beagle_lcd_config __initdata = {
> > .ctrl_name = "internal",
> > };
> >
> > +struct gpio_led gpio_leds[] = {
> > + {
> > + .name = "beagleboard::led0",
> > + .default_trigger = "none",
> > + .gpio = 149,
> > + },
> > + {
> > + .name = "beagleboard::led1",
> > + .default_trigger = "none",
> > + .gpio = 150,
> > + },
> > +};
> > +
> > +static struct gpio_led_platform_data gpio_led_info = {
> > + .leds = gpio_leds,
> > + .num_leds = ARRAY_SIZE(gpio_leds),
> > +};
> > +
> > +static struct platform_device leds_gpio = {
> > + .name = "leds-gpio",
> > + .id = -1,
> > + .dev = {
> > + .platform_data = &gpio_led_info,
> > + },
> > +};
> > +
> > static struct omap_board_config_kernel omap3_beagle_config[]
> > __initdata = {
> > { OMAP_TAG_UART, &omap3_beagle_uart_config },
> > { OMAP_TAG_MMC, &omap3beagle_mmc_config },
> > @@ -83,6 +110,7 @@ static struct platform_device
> > *omap3_beagle_devices[] __initdata = {
> > #ifdef CONFIG_RTC_DRV_TWL4030
> > &omap3_beagle_twl4030rtc_device,
> > #endif
> > + &leds_gpio,
> > };
> >
> > static void __init omap3_beagle_init(void)
> > --
> > 1.5.4.3
> >
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
2008-06-10 21:31 ` Tony Lindgren
@ 2008-06-11 0:49 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2008-06-11 0:49 UTC (permalink / raw)
To: Koen Kooi; +Cc: linux-omap
* Tony Lindgren <tony@atomide.com> [080610 14:35]:
> * Koen Kooi <k.kooi@student.utwente.nl> [080610 14:26]:
> >
> > Op 31 mei 2008, om 02:59 heeft Koen Kooi het volgende geschreven:
> >
> > > From: Koen Kooi <koen@openembedded.org>
> > >
> > > omap3beagle: add a platform device to hook up the GPIO leds to the
> > > leds-gpio driver
> > > * on revision A5 and earlier board the two leds can't be controlled
> > > seperately, should be fixed in rev. B and C boards.
> > >
> > > Changes since v1: indented structs with tabs
> > >
> > > Signed-off-by: Koen Kooi <koen@openembedded.org>
> >
> >
> > Any objections against applying this patch?
>
> Nope, and blinking leds are always considered the highhest priority
> patches ;) Pushing today.
Actually I ended up reformatting it a bit more.
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-11 0:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-31 0:59 [PATCH v2] omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver Koen Kooi
2008-06-10 21:23 ` Koen Kooi
2008-06-10 21:31 ` Tony Lindgren
2008-06-11 0:49 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox