public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] BeagleBoard: Added LED driver
Date: Thu, 21 Apr 2011 00:08:02 +0200	[thread overview]
Message-ID: <20110420220802.01283152160@gemini.denx.de> (raw)
In-Reply-To: <1299013343-29963-1-git-send-email-jkridner@beagleboard.org>

Dear Jason Kridner,

In message <1299013343-29963-1-git-send-email-jkridner@beagleboard.org> you wrote:
> Added LED driver using status_led.  USR0 is set to monitor the boot
> status.  USR1 is set to be the green LED.
> 
> Included adding configuration and command to the default configuration.
> 
> Signed-off-by: Jason Kridner <jkridner@beagleboard.org>
...
> +#ifdef STATUS_LED_GREEN
> +void green_LED_off (void)
...
> +void green_LED_on (void)
...

We doin't allow CamelCase identifiers.

> +		if (!omap_request_gpio(BEAGLE_LED_USR0)) {
> +			omap_set_gpio_direction(BEAGLE_LED_USR0, 0);
> +			omap_set_gpio_dataout(BEAGLE_LED_USR0, state);

Should you not set dataout _before_ direction?  As is, you may drive
the wrong output value for a short time. 

> +		if (!omap_request_gpio(BEAGLE_LED_USR1)) {
> +			omap_set_gpio_direction(BEAGLE_LED_USR1, 0);
> +			omap_set_gpio_dataout(BEAGLE_LED_USR1, state);

Ditto.

  parent reply	other threads:[~2011-04-20 22:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 21:02 [U-Boot] [PATCH] BeagleBoard: Added LED driver Jason Kridner
2011-03-02  1:47 ` Thomas Chou
2011-04-18 21:32 ` Paulraj, Sandeep
2011-04-20 22:08 ` Wolfgang Denk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-05  5:53 Jason Kridner
2010-11-05 12:02 ` Premi, Sanjeev
2010-11-05 17:32   ` Jason Kridner
2010-11-07 21:38     ` Wolfgang Denk

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=20110420220802.01283152160@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /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