* [PATCH] ARM: S5PC210: Add gpio keys at Universal board
@ 2010-08-02 5:28 Kyungmin Park
2010-08-17 8:37 ` Kyungmin Park
0 siblings, 1 reply; 3+ messages in thread
From: Kyungmin Park @ 2010-08-02 5:28 UTC (permalink / raw)
To: linux-arm-kernel
Universal board has 5 gpio keys.
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-s5pv310/mach-universal.c | 62 ++++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s5pv310/mach-universal.c b/arch/arm/mach-s5pv310/mach-universal.c
index b5908d9..d584028 100644
--- a/arch/arm/mach-s5pv310/mach-universal.c
+++ b/arch/arm/mach-s5pv310/mach-universal.c
@@ -7,7 +7,11 @@
* published by the Free Software Foundation.
*/
+#include <linux/platform_device.h>
#include <linux/serial_core.h>
+#include <linux/input.h>
+#include <linux/gpio_keys.h>
+#include <linux/gpio.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -60,6 +64,61 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = {
},
};
+static struct gpio_keys_button universal_gpio_keys_tables[] = {
+ {
+ .code = KEY_VOLUMEUP,
+ .gpio = S5PV310_GPX2(0), /* XEINT16 */
+ .desc = "gpio-keys: KEY_VOLUMEUP",
+ .type = EV_KEY,
+ .active_low = 1,
+ .debounce_interval = 1,
+ }, {
+ .code = KEY_VOLUMEDOWN,
+ .gpio = S5PV310_GPX2(1), /* XEINT17 */
+ .desc = "gpio-keys: KEY_VOLUMEDOWN",
+ .type = EV_KEY,
+ .active_low = 1,
+ .debounce_interval = 1,
+ }, {
+ .code = KEY_CONFIG,
+ .gpio = S5PV310_GPX2(2), /* XEINT18 */
+ .desc = "gpio-keys: KEY_CONFIG",
+ .type = EV_KEY,
+ .active_low = 1,
+ .debounce_interval = 1,
+ }, {
+ .code = KEY_CAMERA,
+ .gpio = S5PV310_GPX2(3), /* XEINT19 */
+ .desc = "gpio-keys: KEY_CAMERA",
+ .type = EV_KEY,
+ .active_low = 1,
+ .debounce_interval = 1,
+ }, {
+ .code = KEY_OK,
+ .gpio = S5PV310_GPX3(5), /* XEINT29 */
+ .desc = "gpio-keys: KEY_OK",
+ .type = EV_KEY,
+ .active_low = 1,
+ .debounce_interval = 1,
+ },
+};
+
+static struct gpio_keys_platform_data universal_gpio_keys_data = {
+ .buttons = universal_gpio_keys_tables,
+ .nbuttons = ARRAY_SIZE(universal_gpio_keys_tables),
+};
+
+static struct platform_device universal_gpio_keys = {
+ .name = "gpio-keys",
+ .dev = {
+ .platform_data = &universal_gpio_keys_data,
+ },
+};
+
+static struct platform_device *universal_devices[] __initdata = {
+ &universal_gpio_keys,
+};
+
static void __init universal_map_io(void)
{
s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -72,6 +131,9 @@ static void __init universal_machine_init(void)
#ifdef CONFIG_CACHE_L2X0
l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
#endif
+
+ /* Last */
+ platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
}
MACHINE_START(UNIVERSAL, "UNIVERSAL")
--
1.5.3.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ARM: S5PC210: Add gpio keys at Universal board
2010-08-02 5:28 [PATCH] ARM: S5PC210: Add gpio keys at Universal board Kyungmin Park
@ 2010-08-17 8:37 ` Kyungmin Park
2010-08-21 1:22 ` Kukjin Kim
0 siblings, 1 reply; 3+ messages in thread
From: Kyungmin Park @ 2010-08-17 8:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kgene,
Can you apply other universal board support?
gpio-keys and gpio-i2c.
and one more request I sent the new gpio support codes. but no one
mention it. any comment? or how can we merge it?
Thank you,
Kyungmin Park
On Mon, Aug 2, 2010 at 2:28 PM, Kyungmin Park <kyungmin.park@samsung.com> wrote:
> Universal board has 5 gpio keys.
>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> ?arch/arm/mach-s5pv310/mach-universal.c | ? 62 ++++++++++++++++++++++++++++++++
> ?1 files changed, 62 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv310/mach-universal.c b/arch/arm/mach-s5pv310/mach-universal.c
> index b5908d9..d584028 100644
> --- a/arch/arm/mach-s5pv310/mach-universal.c
> +++ b/arch/arm/mach-s5pv310/mach-universal.c
> @@ -7,7 +7,11 @@
> ?* published by the Free Software Foundation.
> ?*/
>
> +#include <linux/platform_device.h>
> ?#include <linux/serial_core.h>
> +#include <linux/input.h>
> +#include <linux/gpio_keys.h>
> +#include <linux/gpio.h>
>
> ?#include <asm/mach/arch.h>
> ?#include <asm/mach-types.h>
> @@ -60,6 +64,61 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = {
> ? ? ? ?},
> ?};
>
> +static struct gpio_keys_button universal_gpio_keys_tables[] = {
> + ? ? ? {
> + ? ? ? ? ? ? ? .code ? ? ? ? ? ? ? ? ? = KEY_VOLUMEUP,
> + ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = S5PV310_GPX2(0), ? ? ?/* XEINT16 */
> + ? ? ? ? ? ? ? .desc ? ? ? ? ? ? ? ? ? = "gpio-keys: KEY_VOLUMEUP",
> + ? ? ? ? ? ? ? .type ? ? ? ? ? ? ? ? ? = EV_KEY,
> + ? ? ? ? ? ? ? .active_low ? ? ? ? ? ? = 1,
> + ? ? ? ? ? ? ? .debounce_interval ? ? ?= 1,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .code ? ? ? ? ? ? ? ? ? = KEY_VOLUMEDOWN,
> + ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = S5PV310_GPX2(1), ? ? ?/* XEINT17 */
> + ? ? ? ? ? ? ? .desc ? ? ? ? ? ? ? ? ? = "gpio-keys: KEY_VOLUMEDOWN",
> + ? ? ? ? ? ? ? .type ? ? ? ? ? ? ? ? ? = EV_KEY,
> + ? ? ? ? ? ? ? .active_low ? ? ? ? ? ? = 1,
> + ? ? ? ? ? ? ? .debounce_interval ? ? ?= 1,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .code ? ? ? ? ? ? ? ? ? = KEY_CONFIG,
> + ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = S5PV310_GPX2(2), ? ? ?/* XEINT18 */
> + ? ? ? ? ? ? ? .desc ? ? ? ? ? ? ? ? ? = "gpio-keys: KEY_CONFIG",
> + ? ? ? ? ? ? ? .type ? ? ? ? ? ? ? ? ? = EV_KEY,
> + ? ? ? ? ? ? ? .active_low ? ? ? ? ? ? = 1,
> + ? ? ? ? ? ? ? .debounce_interval ? ? ?= 1,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .code ? ? ? ? ? ? ? ? ? = KEY_CAMERA,
> + ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = S5PV310_GPX2(3), ? ? ?/* XEINT19 */
> + ? ? ? ? ? ? ? .desc ? ? ? ? ? ? ? ? ? = "gpio-keys: KEY_CAMERA",
> + ? ? ? ? ? ? ? .type ? ? ? ? ? ? ? ? ? = EV_KEY,
> + ? ? ? ? ? ? ? .active_low ? ? ? ? ? ? = 1,
> + ? ? ? ? ? ? ? .debounce_interval ? ? ?= 1,
> + ? ? ? }, {
> + ? ? ? ? ? ? ? .code ? ? ? ? ? ? ? ? ? = KEY_OK,
> + ? ? ? ? ? ? ? .gpio ? ? ? ? ? ? ? ? ? = S5PV310_GPX3(5), ? ? ?/* XEINT29 */
> + ? ? ? ? ? ? ? .desc ? ? ? ? ? ? ? ? ? = "gpio-keys: KEY_OK",
> + ? ? ? ? ? ? ? .type ? ? ? ? ? ? ? ? ? = EV_KEY,
> + ? ? ? ? ? ? ? .active_low ? ? ? ? ? ? = 1,
> + ? ? ? ? ? ? ? .debounce_interval ? ? ?= 1,
> + ? ? ? },
> +};
> +
> +static struct gpio_keys_platform_data universal_gpio_keys_data = {
> + ? ? ? .buttons ? ? ? ?= universal_gpio_keys_tables,
> + ? ? ? .nbuttons ? ? ? = ARRAY_SIZE(universal_gpio_keys_tables),
> +};
> +
> +static struct platform_device universal_gpio_keys = {
> + ? ? ? .name ? ? ? ? ? ? ? ? ? = "gpio-keys",
> + ? ? ? .dev ? ? ? ? ? ? ? ? ? ?= {
> + ? ? ? ? ? ? ? .platform_data ?= &universal_gpio_keys_data,
> + ? ? ? },
> +};
> +
> +static struct platform_device *universal_devices[] __initdata = {
> + ? ? ? &universal_gpio_keys,
> +};
> +
> ?static void __init universal_map_io(void)
> ?{
> ? ? ? ?s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -72,6 +131,9 @@ static void __init universal_machine_init(void)
> ?#ifdef CONFIG_CACHE_L2X0
> ? ? ? ?l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
> ?#endif
> +
> + ? ? ? /* Last */
> + ? ? ? platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
> ?}
>
> ?MACHINE_START(UNIVERSAL, "UNIVERSAL")
> --
> 1.5.3.3
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ARM: S5PC210: Add gpio keys at Universal board
2010-08-17 8:37 ` Kyungmin Park
@ 2010-08-21 1:22 ` Kukjin Kim
0 siblings, 0 replies; 3+ messages in thread
From: Kukjin Kim @ 2010-08-21 1:22 UTC (permalink / raw)
To: linux-arm-kernel
Kyungmin Park wrote:
>
> Hi Kgene,
>
Hi,
> Can you apply other universal board support?
> gpio-keys and gpio-i2c.
>
Applied 'gpio-keys' patch. But you requested ignoring your MP0* patch, so
dropped gpio-i2c patch because has dependency.
> and one more request I sent the new gpio support codes. but no one
> mention it. any comment? or how can we merge it?
>
I will sort it out.
> Thank you,
> Kyungmin Park
>
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-21 1:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02 5:28 [PATCH] ARM: S5PC210: Add gpio keys at Universal board Kyungmin Park
2010-08-17 8:37 ` Kyungmin Park
2010-08-21 1:22 ` Kukjin Kim
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).