From 0f631d87d9a5e3f5f22908b102c8eaad944f390e Mon Sep 17 00:00:00 2001 From: Russell King Date: Fri, 19 Aug 2016 09:41:47 -0700 Subject: Input: jornada720_kbd - get rid of mach/irqs.h include Switch the jornada720 keyboard driver to obtain its interrupt from the platform device, rather than via a hard-coded interrupt number obtained from the mach/irqs.h header. Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov --- arch/arm/mach-sa1100/jornada720.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index c0b1f5bafae4..2b96f7bc16bd 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c @@ -217,9 +217,15 @@ static struct platform_device jornada_ssp_device = { .id = -1, }; +static struct resource jornada_kbd_resources[] = { + DEFINE_RES_IRQ(IRQ_GPIO0), +}; + static struct platform_device jornada_kbd_device = { .name = "jornada720_kbd", .id = -1, + .num_resources = ARRAY_SIZE(jornada_kbd_resources), + .resource = jornada_kbd_resources, }; static struct platform_device jornada_ts_device = { -- cgit From 3521a0f05d28e75612bbe1ee014bdfedf831b23f Mon Sep 17 00:00:00 2001 From: Russell King Date: Wed, 7 Sep 2016 19:22:01 -0700 Subject: Input: jornada720_ts - get rid of mach/irqs.h and mach/hardware.h includes Switch the jornada720 touchscreen driver to obtain its gpio from the platform device via gpiolib and derive the interrupt from the GPIO, rather than via a hard-coded interrupt number obtained from the mach/irqs.h and mach/hardware.h headers. Tested-by: Adam Wysocki Signed-off-by: Russell King Signed-off-by: Dmitry Torokhov --- arch/arm/mach-sa1100/jornada720.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index 2b96f7bc16bd..0a2ca9be00e6 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -228,6 +229,13 @@ static struct platform_device jornada_kbd_device = { .resource = jornada_kbd_resources, }; +static struct gpiod_lookup_table jornada_ts_gpiod_table = { + .dev_id = "jornada_ts", + .table = { + GPIO_LOOKUP("gpio", 9, "penup", GPIO_ACTIVE_HIGH), + }, +}; + static struct platform_device jornada_ts_device = { .name = "jornada_ts", .id = -1, @@ -256,6 +264,8 @@ static int __init jornada720_init(void) GPSR = GPIO_GPIO20; /* restart gpio20 */ udelay(20); /* give it some time to restart */ + gpiod_add_lookup_table(&jornada_ts_gpiod_table); + ret = platform_add_devices(devices, ARRAY_SIZE(devices)); } -- cgit