mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
sh: ecovec24: modify tsc2007 platform settings
This patch modify x_plate_ohms to correct value for tsc2007 panel, and removed un-necessary ts_get_pendown_state() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
248bc0d93b
commit
e0009b0a44
1 changed files with 2 additions and 24 deletions
|
@ -400,32 +400,9 @@ static struct platform_device keysc_device = {
|
||||||
|
|
||||||
/* TouchScreen */
|
/* TouchScreen */
|
||||||
#define IRQ0 32
|
#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 = {
|
static struct tsc2007_platform_data tsc2007_info = {
|
||||||
.model = 2007,
|
.model = 2007,
|
||||||
.x_plate_ohms = 180,
|
.x_plate_ohms = 1000,
|
||||||
.get_pendown_state = ts_get_pendown_state,
|
|
||||||
.init_platform_hw = ts_init,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct i2c_board_info ts_i2c_clients = {
|
static struct i2c_board_info ts_i2c_clients = {
|
||||||
|
@ -1119,6 +1096,7 @@ static int __init arch_setup(void)
|
||||||
gpio_direction_output(GPIO_PTF4, 1);
|
gpio_direction_output(GPIO_PTF4, 1);
|
||||||
|
|
||||||
/* enable TouchScreen */
|
/* enable TouchScreen */
|
||||||
|
gpio_request(GPIO_FN_INTC_IRQ0, NULL);
|
||||||
i2c_register_board_info(0, &ts_i2c_clients, 1);
|
i2c_register_board_info(0, &ts_i2c_clients, 1);
|
||||||
set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW);
|
set_irq_type(IRQ0, IRQ_TYPE_LEVEL_LOW);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue