From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH 07/07] ARM: mach-shmobile: Marzen GPIO LED test code
Date: Tue, 06 Dec 2011 16:52:58 +0000 [thread overview]
Message-ID: <20111206165258.19348.75164.sendpatchset@w520> (raw)
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));
}
reply other threads:[~2011-12-06 16:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20111206165258.19348.75164.sendpatchset@w520 \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.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 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.