diff options
-rw-r--r-- | arch/sh/boards/mach-ecovec24/setup.c | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 1d7b495a7db4..db7a7c0e859a 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -400,32 +400,9 @@ static struct platform_device keysc_device = { | |||
400 | 400 | ||
401 | /* TouchScreen */ | 401 | /* TouchScreen */ |
402 | #define IRQ0 32 | 402 | #define IRQ0 32 |
403 | static int ts_get_pendown_state(void) | ||
404 | { | ||
405 | int val = 0; | ||
406 | gpio_free(GPIO_FN_INTC_IRQ0); | ||
407 | gpio_request(GPIO_PTZ0, NULL); | ||
408 | gpio_direction_input(GPIO_PTZ0); | ||
409 | |||
410 | val = gpio_get_value(GPIO_PTZ0); | ||
411 | |||
412 | gpio_free(GPIO_PTZ0); | ||
413 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); | ||
414 | |||
415 | return val ? 0 : 1; | ||
416 | } | ||
417 | |||
418 | static int ts_init(void) | ||
419 | { | ||
420 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); | ||
421 | return 0; | ||
422 | } | ||
423 | |||
424 | static struct tsc2007_platform_data tsc2007_info = { | 403 | static struct tsc2007_platform_data tsc2007_info = { |
425 | .model = 2007, | 404 | .model = 2007, |
426 | .x_plate_ohms = 180, | 405 | .x_plate_ohms = 1000, |
427 | .get_pendown_state = ts_get_pendown_state, | ||
428 | .init_platform_hw = ts_init, | ||
429 | }; | 406 | }; |
430 | 407 | ||
431 | static struct i2c_board_info ts_i2c_clients = { | 408 | static struct i2c_board_info ts_i2c_clients = { |
@@ -1119,6 +1096,7 @@ static int __init arch_setup(void) | |||
1119 | gpio_direction_output(GPIO_PTF4, 1); | 1096 | gpio_direction_output(GPIO_PTF4, 1); |
1120 | 1097 | ||
1121 | /* enable TouchScreen */ | 1098 | /* enable TouchScreen */ |
1099 | gpio_request(GPIO_FN_INTC_IRQ0, NULL); | ||
1122 | i2c_register_board_info(0, &ts_i2c_clients, 1); | 1100 | i2c_register_board_info(0, &ts_i2c_clients, 1); |
1123 | set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW); | 1101 | set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW); |
1124 | } | 1102 | } |