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 7/7] pcm038: led testing. Not to be committed
Date: Sat, 18 Dec 2010 16:15:09 +0100	[thread overview]
Message-ID: <1292685309-32326-8-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1292685309-32326-1-git-send-email-s.hauer@pengutronix.de>

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

diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index 1dbc6b6..cfca7d3 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -44,6 +44,7 @@
 #include <mach/spi.h>
 #include <mach/iomux-mx27.h>
 #include <mach/devices-imx27.h>
+#include <led.h>
 
 #include "pll.h"
 
@@ -192,11 +193,26 @@ static void pcm038_mmu_init(void)
 }
 #endif
 
+struct gpio_led led1 = {
+	.gpio = 10,
+};
+
+struct gpio_led led2 = {
+	.gpio = 11,
+	.active_low = 1,
+};
+
+struct gpio_rgb_led led3 = {
+	.gpio_r = 12,
+	.gpio_g = 13,
+	.gpio_b = 14,
+	.active_low = 1,
+};
+
 static int pcm038_devices_init(void)
 {
 	int i;
 	char *envdev;
-
 	unsigned int mode[] = {
 		PD0_AIN_FEC_TXD0,
 		PD1_AIN_FEC_TXD1,
@@ -270,6 +286,12 @@ static int pcm038_devices_init(void)
 
 	pcm038_mmu_init();
 
+	led_gpio_register(&led1);
+	led_gpio_register(&led2);
+	led_gpio_rgb_register(&led3);
+	led_set_trigger(led_trigger_net_tx, &led1.led);
+	led_set_trigger(led_trigger_net_rx, &led2.led);
+
 	/* configure 16 bit nor flash on cs0 */
 	CS0U = 0x0000CC03;
 	CS0L = 0xa0330D01;
-- 
1.7.2.3


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

      parent reply	other threads:[~2010-12-18 15:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-18 15:15 LED framework Sascha Hauer
2010-12-18 15:15 ` [PATCH 1/7] Add generic poll infrastructure Sascha Hauer
2010-12-18 15:28   ` Sascha Hauer
2010-12-18 15:15 ` [PATCH 2/7] basic LED support Sascha Hauer
2010-12-18 16:38   ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-18 17:18     ` Sascha Hauer
2010-12-18 16:48   ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-18 19:06   ` Belisko Marek
2010-12-19 21:31   ` Marc Reilly
2010-12-20  8:27     ` Sascha Hauer
2010-12-18 15:15 ` [PATCH 3/7] LED: Add gpio " Sascha Hauer
2010-12-18 16:41   ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-18 17:18     ` Sascha Hauer
2010-12-18 15:15 ` [PATCH 4/7] LED: Add LED trigger support Sascha Hauer
2010-12-18 16:51   ` Belisko Marek
2010-12-18 17:21     ` Sascha Hauer
2010-12-18 15:15 ` [PATCH 5/7] LED: Add led command Sascha Hauer
2010-12-18 16:45   ` Jean-Christophe PLAGNIOL-VILLARD
2010-12-18 17:24     ` Sascha Hauer
2010-12-18 15:15 ` [PATCH 6/7] LED: Add trigger command Sascha Hauer
2010-12-18 15:15 ` Sascha Hauer [this message]

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=1292685309-32326-8-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