* [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs
@ 2013-07-30 1:58 Simon Horman
2013-07-30 1:59 ` [PATCH 1/4] ARM: shmobile: ape6evm: support GPIO switches Simon Horman
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Simon Horman @ 2013-07-30 1:58 UTC (permalink / raw)
To: linux-arm-kernel
This short series adds support for GPIO swtiches and LEDS to
the ape6evm board.
Applies on top of renesas-devel-20130726.
Simon Horman (4):
ARM: shmobile: ape6evm: support GPIO switches
ARM: shmobile: ape6evm: Enable gpio-keys in defconfig
ARM: shmobile: ape6evm: Add GPIO LEDs
ARM: shmobile: ape6evm: Enable gpio-leds in defconfig
arch/arm/configs/ape6evm_defconfig | 6 +++-
arch/arm/mach-shmobile/board-ape6evm.c | 60 ++++++++++++++++++++++++++++++++++
2 files changed, 65 insertions(+), 1 deletion(-)
--
1.8.3.2
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] ARM: shmobile: ape6evm: support GPIO switches
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
@ 2013-07-30 1:59 ` Simon Horman
2013-07-30 1:59 ` [PATCH 2/4] ARM: shmobile: ape6evm: Enable gpio-keys in defconfig Simon Horman
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-07-30 1:59 UTC (permalink / raw)
To: linux-arm-kernel
The ape6evm board has switches S16 - S23 wired up to GPIO pins.
This patch allows access to those pins as gpio-keys.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-ape6evm.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index ccf8b04..677752c 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -19,6 +19,8 @@
*/
#include <linux/gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mfd/tmio.h>
@@ -37,6 +39,24 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
+/* GPIO KEY */
+#define GPIO_KEY(c, g, d, ...) \
+ { .code = c, .gpio = g, .desc = d, .active_low = 1 }
+
+static struct gpio_keys_button gpio_buttons[] = {
+ GPIO_KEY(KEY_0, 324, "S16"),
+ GPIO_KEY(KEY_MENU, 325, "S17"),
+ GPIO_KEY(KEY_HOME, 326, "S18"),
+ GPIO_KEY(KEY_BACK, 327, "S19"),
+ GPIO_KEY(KEY_VOLUMEUP, 328, "S20"),
+ GPIO_KEY(KEY_VOLUMEDOWN, 329, "S21"),
+};
+
+static struct __initdata gpio_keys_platform_data ape6evm_keys_pdata = {
+ .buttons = gpio_buttons,
+ .nbuttons = ARRAY_SIZE(gpio_buttons),
+};
+
/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
@@ -172,6 +192,9 @@ static void __init ape6evm_add_standard_devices(void)
platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
&sdhi1_pdata, sizeof(sdhi1_pdata));
+ platform_device_register_data(&platform_bus, "gpio-keys", -1,
+ &ape6evm_keys_pdata,
+ sizeof(ape6evm_keys_pdata));
}
static const char *ape6evm_boards_compat_dt[] __initdata = {
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/4] ARM: shmobile: ape6evm: Enable gpio-keys in defconfig
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
2013-07-30 1:59 ` [PATCH 1/4] ARM: shmobile: ape6evm: support GPIO switches Simon Horman
@ 2013-07-30 1:59 ` Simon Horman
2013-07-30 1:59 ` [PATCH 3/4] ARM: shmobile: ape6evm: Add GPIO LEDs Simon Horman
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-07-30 1:59 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/configs/ape6evm_defconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig
index dab5a7d..e4359c7 100644
--- a/arch/arm/configs/ape6evm_defconfig
+++ b/arch/arm/configs/ape6evm_defconfig
@@ -54,7 +54,8 @@ CONFIG_NETDEVICES=y
CONFIG_SMC91X=y
CONFIG_SMSC911X=y
# CONFIG_INPUT_MOUSEDEV is not set
-# CONFIG_INPUT_KEYBOARD is not set
+CONFIG_INPUT_EVDEV=y
+CONFIG_KEYBOARD_GPIO=y
# CONFIG_INPUT_MOUSE is not set
# CONFIG_SERIO is not set
CONFIG_SERIAL_NONSTANDARD=y
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] ARM: shmobile: ape6evm: Add GPIO LEDs
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
2013-07-30 1:59 ` [PATCH 1/4] ARM: shmobile: ape6evm: support GPIO switches Simon Horman
2013-07-30 1:59 ` [PATCH 2/4] ARM: shmobile: ape6evm: Enable gpio-keys in defconfig Simon Horman
@ 2013-07-30 1:59 ` Simon Horman
2013-07-30 1:59 ` [PATCH 4/4] ARM: shmobile: ape6evm: Enable gpio-leds in defconfig Simon Horman
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-07-30 1:59 UTC (permalink / raw)
To: linux-arm-kernel
The board has 6 LEDs connected to GPIOs. Add a led-gpio device to
support them.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/mach-shmobile/board-ape6evm.c | 37 ++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
index 677752c..db97460 100644
--- a/arch/arm/mach-shmobile/board-ape6evm.c
+++ b/arch/arm/mach-shmobile/board-ape6evm.c
@@ -39,6 +39,40 @@
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
+/* LEDS */
+static struct gpio_led ape6evm_leds[] = {
+ {
+ .name = "gnss-en",
+ .gpio = 28,
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
+ }, {
+ .name = "nfc-nrst",
+ .gpio = 126,
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
+ }, {
+ .name = "gnss-nrst",
+ .gpio = 132,
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
+ }, {
+ .name = "bt-wakeup",
+ .gpio = 232,
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
+ }, {
+ .name = "strobe",
+ .gpio = 250,
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
+ }, {
+ .name = "bbresetout",
+ .gpio = 288,
+ .default_state = LEDS_GPIO_DEFSTATE_OFF,
+ },
+};
+
+static __initdata struct gpio_led_platform_data ape6evm_leds_pdata = {
+ .leds = ape6evm_leds,
+ .num_leds = ARRAY_SIZE(ape6evm_leds),
+};
+
/* GPIO KEY */
#define GPIO_KEY(c, g, d, ...) \
{ .code = c, .gpio = g, .desc = d, .active_low = 1 }
@@ -195,6 +229,9 @@ static void __init ape6evm_add_standard_devices(void)
platform_device_register_data(&platform_bus, "gpio-keys", -1,
&ape6evm_keys_pdata,
sizeof(ape6evm_keys_pdata));
+ platform_device_register_data(&platform_bus, "leds-gpio", -1,
+ &ape6evm_leds_pdata,
+ sizeof(ape6evm_leds_pdata));
}
static const char *ape6evm_boards_compat_dt[] __initdata = {
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] ARM: shmobile: ape6evm: Enable gpio-leds in defconfig
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
` (2 preceding siblings ...)
2013-07-30 1:59 ` [PATCH 3/4] ARM: shmobile: ape6evm: Add GPIO LEDs Simon Horman
@ 2013-07-30 1:59 ` Simon Horman
2013-08-01 8:01 ` [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
2013-08-05 7:57 ` Kuninori Morimoto
5 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-07-30 1:59 UTC (permalink / raw)
To: linux-arm-kernel
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
arch/arm/configs/ape6evm_defconfig | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig
index e4359c7..1ce3994 100644
--- a/arch/arm/configs/ape6evm_defconfig
+++ b/arch/arm/configs/ape6evm_defconfig
@@ -72,6 +72,9 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
CONFIG_REGULATOR_GPIO=y
# CONFIG_HID is not set
# CONFIG_USB_SUPPORT is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
# CONFIG_IOMMU_SUPPORT is not set
# CONFIG_DNOTIFY is not set
CONFIG_TMPFS=y
--
1.8.3.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
` (3 preceding siblings ...)
2013-07-30 1:59 ` [PATCH 4/4] ARM: shmobile: ape6evm: Enable gpio-leds in defconfig Simon Horman
@ 2013-08-01 8:01 ` Simon Horman
2013-08-05 7:47 ` Simon Horman
2013-08-05 7:57 ` Kuninori Morimoto
5 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2013-08-01 8:01 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Jul 30, 2013 at 10:58:59AM +0900, Simon Horman wrote:
> This short series adds support for GPIO swtiches and LEDS to
> the ape6evm board.
>
> Applies on top of renesas-devel-20130726.
>
> Simon Horman (4):
> ARM: shmobile: ape6evm: support GPIO switches
> ARM: shmobile: ape6evm: Enable gpio-keys in defconfig
> ARM: shmobile: ape6evm: Add GPIO LEDs
> ARM: shmobile: ape6evm: Enable gpio-leds in defconfig
>
> arch/arm/configs/ape6evm_defconfig | 6 +++-
> arch/arm/mach-shmobile/board-ape6evm.c | 60 ++++++++++++++++++++++++++++++++++
Hi Magnus, Hi All,
could I get a review of this, and if appropriate an Ack.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs
2013-08-01 8:01 ` [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
@ 2013-08-05 7:47 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-08-05 7:47 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 01, 2013 at 05:01:32PM +0900, Simon Horman wrote:
> On Tue, Jul 30, 2013 at 10:58:59AM +0900, Simon Horman wrote:
> > This short series adds support for GPIO swtiches and LEDS to
> > the ape6evm board.
> >
> > Applies on top of renesas-devel-20130726.
> >
> > Simon Horman (4):
> > ARM: shmobile: ape6evm: support GPIO switches
> > ARM: shmobile: ape6evm: Enable gpio-keys in defconfig
> > ARM: shmobile: ape6evm: Add GPIO LEDs
> > ARM: shmobile: ape6evm: Enable gpio-leds in defconfig
> >
> > arch/arm/configs/ape6evm_defconfig | 6 +++-
> > arch/arm/mach-shmobile/board-ape6evm.c | 60 ++++++++++++++++++++++++++++++++++
>
> Hi Magnus, Hi All,
>
> could I get a review of this, and if appropriate an Ack.
Ping.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
` (4 preceding siblings ...)
2013-08-01 8:01 ` [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
@ 2013-08-05 7:57 ` Kuninori Morimoto
2013-08-06 0:38 ` Simon Horman
5 siblings, 1 reply; 9+ messages in thread
From: Kuninori Morimoto @ 2013-08-05 7:57 UTC (permalink / raw)
To: linux-arm-kernel
Hi Simon
> This short series adds support for GPIO swtiches and LEDS to
> the ape6evm board.
>
> Applies on top of renesas-devel-20130726.
>
> Simon Horman (4):
> ARM: shmobile: ape6evm: support GPIO switches
> ARM: shmobile: ape6evm: Enable gpio-keys in defconfig
> ARM: shmobile: ape6evm: Add GPIO LEDs
> ARM: shmobile: ape6evm: Enable gpio-leds in defconfig
>
> arch/arm/configs/ape6evm_defconfig | 6 +++-
> arch/arm/mach-shmobile/board-ape6evm.c | 60 ++++++++++++++++++++++++++++++++++
> 2 files changed, 65 insertions(+), 1 deletion(-)
For all patches
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs
2013-08-05 7:57 ` Kuninori Morimoto
@ 2013-08-06 0:38 ` Simon Horman
0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-08-06 0:38 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Aug 05, 2013 at 12:57:55AM -0700, Kuninori Morimoto wrote:
>
> Hi Simon
>
> > This short series adds support for GPIO swtiches and LEDS to
> > the ape6evm board.
> >
> > Applies on top of renesas-devel-20130726.
> >
> > Simon Horman (4):
> > ARM: shmobile: ape6evm: support GPIO switches
> > ARM: shmobile: ape6evm: Enable gpio-keys in defconfig
> > ARM: shmobile: ape6evm: Add GPIO LEDs
> > ARM: shmobile: ape6evm: Enable gpio-leds in defconfig
> >
> > arch/arm/configs/ape6evm_defconfig | 6 +++-
> > arch/arm/mach-shmobile/board-ape6evm.c | 60 ++++++++++++++++++++++++++++++++++
> > 2 files changed, 65 insertions(+), 1 deletion(-)
>
> For all patches
>
> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thanks.
I have queued up these patches for v3.12.
The two defconfig patches are in the defconfig branch.
And the other two patches are in the boards2 branch.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-08-06 0:38 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-30 1:58 [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
2013-07-30 1:59 ` [PATCH 1/4] ARM: shmobile: ape6evm: support GPIO switches Simon Horman
2013-07-30 1:59 ` [PATCH 2/4] ARM: shmobile: ape6evm: Enable gpio-keys in defconfig Simon Horman
2013-07-30 1:59 ` [PATCH 3/4] ARM: shmobile: ape6evm: Add GPIO LEDs Simon Horman
2013-07-30 1:59 ` [PATCH 4/4] ARM: shmobile: ape6evm: Enable gpio-leds in defconfig Simon Horman
2013-08-01 8:01 ` [PATCH 0/4] ARM: shmobile: ape6evm: support GPIO switches and LEDs Simon Horman
2013-08-05 7:47 ` Simon Horman
2013-08-05 7:57 ` Kuninori Morimoto
2013-08-06 0:38 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).