|
17 | 17 | #include <linux/kernel.h> |
18 | 18 | #include <linux/tty.h> |
19 | 19 | #include <linux/delay.h> |
| 20 | +#include <linux/gpio/machine.h> |
20 | 21 | #include <linux/platform_data/sa11x0-serial.h> |
21 | 22 | #include <linux/platform_device.h> |
22 | 23 | #include <linux/ioport.h> |
@@ -217,9 +218,22 @@ static struct platform_device jornada_ssp_device = { |
217 | 218 | .id = -1, |
218 | 219 | }; |
219 | 220 |
|
| 221 | +static struct resource jornada_kbd_resources[] = { |
| 222 | + DEFINE_RES_IRQ(IRQ_GPIO0), |
| 223 | +}; |
| 224 | + |
220 | 225 | static struct platform_device jornada_kbd_device = { |
221 | 226 | .name = "jornada720_kbd", |
222 | 227 | .id = -1, |
| 228 | + .num_resources = ARRAY_SIZE(jornada_kbd_resources), |
| 229 | + .resource = jornada_kbd_resources, |
| 230 | +}; |
| 231 | + |
| 232 | +static struct gpiod_lookup_table jornada_ts_gpiod_table = { |
| 233 | + .dev_id = "jornada_ts", |
| 234 | + .table = { |
| 235 | + GPIO_LOOKUP("gpio", 9, "penup", GPIO_ACTIVE_HIGH), |
| 236 | + }, |
223 | 237 | }; |
224 | 238 |
|
225 | 239 | static struct platform_device jornada_ts_device = { |
@@ -250,6 +264,8 @@ static int __init jornada720_init(void) |
250 | 264 | GPSR = GPIO_GPIO20; /* restart gpio20 */ |
251 | 265 | udelay(20); /* give it some time to restart */ |
252 | 266 |
|
| 267 | + gpiod_add_lookup_table(&jornada_ts_gpiod_table); |
| 268 | + |
253 | 269 | ret = platform_add_devices(devices, ARRAY_SIZE(devices)); |
254 | 270 | } |
255 | 271 |
|
|
0 commit comments