mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/5] ARM scb9328: Add gpio led support
Date: Tue,  8 Mar 2011 12:39:41 +0100	[thread overview]
Message-ID: <1299584385-6016-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1299584385-6016-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/scb9328/scb9328.c |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boards/scb9328/scb9328.c b/arch/arm/boards/scb9328/scb9328.c
index 35c7fdf..a98d9fe 100644
--- a/arch/arm/boards/scb9328/scb9328.c
+++ b/arch/arm/boards/scb9328/scb9328.c
@@ -31,6 +31,7 @@
 #include <fs.h>
 #include <fcntl.h>
 #include <dm9000.h>
+#include <led.h>
 
 static struct device_d cfi_dev = {
 	.id	  = -1,
@@ -68,9 +69,30 @@ static struct device_d dm9000_dev = {
 	.platform_data = &dm9000_data,
 };
 
-static int scb9328_devices_init(void) {
+struct gpio_led leds[] = {
+	{
+		.gpio = 32 + 21,
+	}, {
+		.gpio = 32 + 22,
+	}, {
+		.gpio = 32 + 23,
+	}, {
+		.gpio = 32 + 24,
+	},
+};
+
+static int scb9328_devices_init(void)
+{
+	int i;
 
 	imx_gpio_mode(PA23_PF_CS5);
+	imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 21);
+	imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 22);
+	imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 23);
+	imx_gpio_mode(GPIO_PORTB | GPIO_GPIO | GPIO_OUT | 24);
+
+	for (i = 0; i < ARRAY_SIZE(leds); i++)
+		led_gpio_register(&leds[i]);
 
 /* CS3 becomes CS3 by clearing reset default bit 1 in FMCR */
 	FMCR = 0x1;
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-03-08 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08 11:39 assorted patches Sascha Hauer
2011-03-08 11:39 ` Sascha Hauer [this message]
2011-03-08 11:39 ` [PATCH 2/5] ramfs: increase chunk size to 4 kbyte Sascha Hauer
2011-03-08 11:39 ` [PATCH 3/5] mfd/mc13892: Add missing semicolons Sascha Hauer
2011-03-08 11:39 ` [PATCH 4/5] module: CONFIG_COMMAND does not exist anymore, remove ifdefs Sascha Hauer
2011-03-08 11:39 ` [PATCH 5/5] trigger command: fix printf format Sascha Hauer

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=1299584385-6016-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@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