summaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-09-14 18:26:38 +0900
committerPaul Mundt <lethal@linux-sh.org>2010-09-14 18:26:38 +0900
commit5d75b3a2476d848a354d939d2b89c36d3394ac59 (patch)
tree11bd7e9cc0679c99d384aff4dbd5d81c13397d0f /arch/sh
parent51d149be0a535634b86493a4d910e3320cc984ea (diff)
downloadop-kernel-dev-5d75b3a2476d848a354d939d2b89c36d3394ac59.zip
op-kernel-dev-5d75b3a2476d848a354d939d2b89c36d3394ac59.tar.gz
Revert "sh: ecovec24: modify tsc2007 platform settings"
According to Morimoto-san, this is no longer needed. Revert it. This reverts commit e0009b0a44f28227571d8cddebc5ccdae86027a6. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/boards/mach-ecovec24/setup.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
index db7a7c0..1d7b495 100644
--- a/arch/sh/boards/mach-ecovec24/setup.c
+++ b/arch/sh/boards/mach-ecovec24/setup.c
@@ -400,9 +400,32 @@ static struct platform_device keysc_device = {
/* TouchScreen */
#define IRQ0 32
+static int ts_get_pendown_state(void)
+{
+ int val = 0;
+ gpio_free(GPIO_FN_INTC_IRQ0);
+ gpio_request(GPIO_PTZ0, NULL);
+ gpio_direction_input(GPIO_PTZ0);
+
+ val = gpio_get_value(GPIO_PTZ0);
+
+ gpio_free(GPIO_PTZ0);
+ gpio_request(GPIO_FN_INTC_IRQ0, NULL);
+
+ return val ? 0 : 1;
+}
+
+static int ts_init(void)
+{
+ gpio_request(GPIO_FN_INTC_IRQ0, NULL);
+ return 0;
+}
+
static struct tsc2007_platform_data tsc2007_info = {
.model = 2007,
- .x_plate_ohms = 1000,
+ .x_plate_ohms = 180,
+ .get_pendown_state = ts_get_pendown_state,
+ .init_platform_hw = ts_init,
};
static struct i2c_board_info ts_i2c_clients = {
@@ -1096,7 +1119,6 @@ static int __init arch_setup(void)
gpio_direction_output(GPIO_PTF4, 1);
/* enable TouchScreen */
- gpio_request(GPIO_FN_INTC_IRQ0, NULL);
i2c_register_board_info(0, &ts_i2c_clients, 1);
set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW);
}
OpenPOWER on IntegriCloud