All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 07/07] ARM: mach-shmobile: Marzen GPIO LED test code
@ 2011-12-06 16:52 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2011-12-06 16:52 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@opensource.se>

Add prototype code for LED2, LED3 and LED4 on the Marzen board.

Should most likely use the LED framework, but is OK as-is for
now when testing the r8a7779 GPIO/PFC code.

Not-yet-signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/board-marzen.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- 0010/arch/arm/mach-shmobile/board-marzen.c
+++ work/arch/arm/mach-shmobile/board-marzen.c	2011-12-07 00:25:39.000000000 +0900
@@ -25,6 +25,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/io.h>
+#include <linux/gpio.h>
 #include <linux/dma-mapping.h>
 #include <mach/hardware.h>
 #include <mach/r8a7779.h>
@@ -94,6 +95,18 @@ static void __init marzen_init(void)
 {
 	r8a7779_pinmux_init();
 
+	gpio_request(GPIO_GP_4_29, NULL); /* LED2 */
+	gpio_direction_output(GPIO_GP_4_29, 0);
+	gpio_export(GPIO_GP_4_29, false);
+
+	gpio_request(GPIO_GP_4_30, NULL); /* LED3 */
+	gpio_direction_output(GPIO_GP_4_30, 0);
+	gpio_export(GPIO_GP_4_30, false);
+
+	gpio_request(GPIO_GP_4_31, NULL); /* LED4 */
+	gpio_direction_output(GPIO_GP_4_31, 0);
+	gpio_export(GPIO_GP_4_31, false);
+
 	r8a7779_add_standard_devices();
 	platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices));
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-06 16:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-06 16:52 [PATCH 07/07] ARM: mach-shmobile: Marzen GPIO LED test code Magnus Damm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.