From: Wolfgang Denk Date: Thu, 21 Apr 2011 00:08:02 +0200 Subject: [U-Boot] [PATCH] BeagleBoard: Added LED driver In-Reply-To: <1299013343-29963-1-git-send-email-jkridner@beagleboard.org> References: <1299013343-29963-1-git-send-email-jkridner@beagleboard.org> Message-ID: <20110420220802.01283152160@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 ... > +#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.