From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: shmobile: lager: Add GPIO LEDs
Date: Tue, 23 Apr 2013 12:48:03 +0200 [thread overview]
Message-ID: <2538127.Zp8aiG0hQe@avalon> (raw)
In-Reply-To: <20130423011524.GE12017@verge.net.au>
Hi Simon,
On Tuesday 23 April 2013 10:15:25 Simon Horman wrote:
> On Mon, Apr 22, 2013 at 12:00:02PM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> >
> > Thank you for the patch.
> >
> > On Monday 22 April 2013 12:06:30 Simon Horman wrote:
> > > The board has 3 LEDs connected to GPIOs. Add a led-gpio device to
> > > support them.
> > >
> > > Based on "ARM: shmobile: marzen: Add GPIO LEDs" by Laurent Pinchart.
> > >
> > > Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > > ---
> > >
> > > arch/arm/mach-shmobile/board-lager.c | 37 +++++++++++++++++++++++++++++
> > > 1 file changed, 37 insertions(+)
> > >
> > > Tested on lager board.
> > > Based on the tag renesas-next-20130419 of my renesas tree.
> > >
> > > diff --git a/arch/arm/mach-shmobile/board-lager.c
> > > b/arch/arm/mach-shmobile/board-lager.c index 6114edd..a8aa04f 100644
> > > --- a/arch/arm/mach-shmobile/board-lager.c
> > > +++ b/arch/arm/mach-shmobile/board-lager.c
> > > @@ -21,13 +21,49 @@
> > > #include <linux/interrupt.h>
> > > #include <linux/irqchip.h>
> > > #include <linux/kernel.h>
> > > +#include <linux/leds.h>
> > > #include <linux/pinctrl/machine.h>
> > > +#include <linux/platform_data/gpio-rcar.h>
> > > #include <linux/platform_device.h>
> > > #include <mach/common.h>
> > > #include <mach/r8a7790.h>
> > > #include <asm/mach-types.h>
> > > #include <asm/mach/arch.h>
> > >
> > > +/* LEDS */
> > > +static struct gpio_led lager_leds[] = {
> > > + {
> > > + .name = "led8",
> > > + .gpio = RCAR_GP_PIN(5, 17),
> > > + .default_state = LEDS_GPIO_DEFSTATE_ON,
> > > + }, {
> > > + .name = "led7",
> > > + .gpio = RCAR_GP_PIN(4, 23),
> > > + .default_state = LEDS_GPIO_DEFSTATE_ON,
> > > + }, {
> > > + .name = "led6",
> > > + .gpio = RCAR_GP_PIN(4, 22),
> > > + .default_state = LEDS_GPIO_DEFSTATE_ON,
> >
> > Just out of curiosity, why is the default state on ?
>
> Only because thats what the marzen code does.
> Would off be a better choice?
It would save a little bit of power by default :-)
> > > + },
> > > +};
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-04-23 10:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-22 3:06 [PATCH] ARM: shmobile: lager: Add GPIO LEDs Simon Horman
2013-04-22 10:00 ` Laurent Pinchart
2013-04-23 1:15 ` Simon Horman
2013-04-23 10:48 ` Laurent Pinchart [this message]
2013-04-26 2:23 ` Simon Horman
2013-04-22 12:27 ` Sergei Shtylyov
2013-04-23 1:17 ` Simon Horman
2013-04-23 2:36 ` Simon Horman
-- strict thread matches above, loose matches on Subject: below --
2013-04-23 2:37 Simon Horman
2013-04-30 2:10 ` Simon Horman
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=2538127.Zp8aiG0hQe@avalon \
--to=laurent.pinchart@ideasonboard.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox