mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: s.hauer@pengutronix.de
Cc: barebox@lists.infradead.org
Subject: [PATCH 5/7] eukrea_cpuimx25: add led support
Date: Fri,  7 Jan 2011 17:35:31 +0100	[thread overview]
Message-ID: <1294418133-5256-5-git-send-email-eric@eukrea.com> (raw)
In-Reply-To: <1294418133-5256-1-git-send-email-eric@eukrea.com>

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
index 3048c3f..ce9be97 100644
--- a/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
+++ b/arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c
@@ -31,6 +31,7 @@
 #include <mach/gpio.h>
 #include <asm/io.h>
 #include <asm/mmu.h>
+#include <led.h>
 
 #include <partition.h>
 #include <generated/mach-types.h>
@@ -132,6 +133,11 @@ static struct imx_fb_platform_data eukrea_cpuimx25_fb_data = {
 	.dmacr		= 0x80040060,
 };
 
+struct gpio_led led0 = {
+	.gpio = 2 * 32 + 19,
+	.active_low = 1,
+};
+
 #ifdef CONFIG_USB
 static void imx25_usb_init(void)
 {
@@ -243,6 +249,8 @@ static struct pad_desc eukrea_cpuimx25_pads[] = {
 	MX25_PAD_SD1_DATA1__DAT1,
 	MX25_PAD_SD1_DATA2__DAT2,
 	MX25_PAD_SD1_DATA3__DAT3,
+	/* LED */
+	MX25_PAD_POWER_FAIL__GPIO19,
 };
 
 static int eukrea_cpuimx25_devices_init(void)
@@ -252,6 +260,8 @@ static int eukrea_cpuimx25_devices_init(void)
 	mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx25_pads,
 		ARRAY_SIZE(eukrea_cpuimx25_pads));
 
+	led_gpio_register(&led0);
+
 	imx25_add_fec(&fec_info);
 
 	nand_info.width = 1;
@@ -271,6 +281,9 @@ static int eukrea_cpuimx25_devices_init(void)
 	gpio_direction_output(26, 1);
 	gpio_set_value(26, 1);
 
+	/* LED : default OFF */
+	gpio_direction_output(2 * 32 + 19, 1);
+
 	imx25_add_fb(&eukrea_cpuimx25_fb_data);
 
 	imx25_add_i2c0(NULL);
-- 
1.7.3.4


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

  parent reply	other threads:[~2011-01-07 16:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 16:35 [PATCH 1/7] _update_help: fix script name Eric Bénard
2011-01-07 16:35 ` [PATCH 2/7] defaultenv/bin/boot: make ubi root's name configurable Eric Bénard
2011-01-07 16:35 ` [PATCH 3/7] defaultenv/bin/update: let /env/config set default values Eric Bénard
2011-01-07 16:35 ` [PATCH 4/7] update: add bareboxenv update possibility Eric Bénard
2011-01-07 16:35 ` Eric Bénard [this message]
2011-01-07 16:35 ` [PATCH 6/7] eukrea_cpuimx25: switch to default environement Eric Bénard
2011-01-07 16:35 ` [PATCH 7/7] eukrea_cpuimx25: update defconfig Eric Bénard

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=1294418133-5256-5-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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