public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Koen Kooi <k.kooi@student.utwente.nl>
Cc: linux-omap@vger.kernel.org, Koen Kooi <koen@openembedded.org>
Subject: Re: [PATCH] ARM: OMAP: omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver
Date: Fri, 30 May 2008 14:05:57 -0700	[thread overview]
Message-ID: <20080530210557.GB30901@atomide.com> (raw)
In-Reply-To: <1212148448-7049-1-git-send-email-k.kooi@student.utwente.nl>

Hi,

* Koen Kooi <k.kooi@student.utwente.nl> [080530 05:00]:
> 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.
> 
> 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 },

Just one nitpicking cosmetic comment.. Can you please reformat the led structs
above using the standard Linux way with tabs:

...
	{
		.name			= "beagleboard::led0",
		.default_trigger	= "none",
		.gpio			= 149,
	},
...

Thanks,

Tony


> @@ -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

      reply	other threads:[~2008-05-30 21:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-30 11:54 [PATCH] ARM: OMAP: omap3beagle: add a platform device to hook up the GPIO leds to the leds-gpio driver Koen Kooi
2008-05-30 21:05 ` Tony Lindgren [this message]

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=20080530210557.GB30901@atomide.com \
    --to=tony@atomide.com \
    --cc=k.kooi@student.utwente.nl \
    --cc=koen@openembedded.org \
    --cc=linux-omap@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox