diff --git a/arch/arm/mach-msm/wi500q_evb2_gpio_pinmux.h b/arch/arm/mach-msm/wi500q_evb2_gpio_pinmux.h index 81fce48df868117d5faa37844c8a2228b79946f1..38312a1b4926da984642f18ec7f7a95aa9b8471f 100755 --- a/arch/arm/mach-msm/wi500q_evb2_gpio_pinmux.h +++ b/arch/arm/mach-msm/wi500q_evb2_gpio_pinmux.h @@ -76,6 +76,13 @@ static struct msm_gpiomux_config wi500q_evb2_msm8226_gpio_configs[] __initdata= // ASUS_BSP BerylHou --- // ASUS_BSP +++ Cliff_Yu "TOUCH" + { + .gpio = 16, + .settings = { + [GPIOMUX_ACTIVE] = &touch_reset, + [GPIOMUX_SUSPENDED] = &touch_reset, + }, + }, { .gpio = 17, .settings = { diff --git a/arch/arm/mach-msm/wi500q_gpio_pinmux_setting.h b/arch/arm/mach-msm/wi500q_gpio_pinmux_setting.h index 09129f8a0be270e7bbb87f5be2a26af0d2bf0103..ebdd22b23ac8df1335727b8947cdc9cb4987d6ff 100644 --- a/arch/arm/mach-msm/wi500q_gpio_pinmux_setting.h +++ b/arch/arm/mach-msm/wi500q_gpio_pinmux_setting.h @@ -154,6 +154,13 @@ static struct gpiomux_setting touch_int = { //IT7260 .pull = GPIOMUX_PULL_NONE, .dir = GPIOMUX_IN, }; + +static struct gpiomux_setting touch_reset = { //IT7260 + .func = GPIOMUX_FUNC_GPIO, + .drv = GPIOMUX_DRV_2MA, + .pull = GPIOMUX_PULL_NONE, + .dir = GPIOMUX_IN, +}; //ASUS_BSP --- Cliff_Yu "Touch Porting" // ASUS_BSP BerylHou +++ "BT config" diff --git a/arch/arm/mach-msm/wi500q_sr2_gpio_pinmux.h b/arch/arm/mach-msm/wi500q_sr2_gpio_pinmux.h index e4bed9476cc71dda6946c157fd402c087abea3ac..8c5a849b9623d25027d0554d232cb25b259e8585 100755 --- a/arch/arm/mach-msm/wi500q_sr2_gpio_pinmux.h +++ b/arch/arm/mach-msm/wi500q_sr2_gpio_pinmux.h @@ -66,6 +66,13 @@ static struct msm_gpiomux_config wi500q_sr2_msm8226_gpio_configs[] __initdata= { }, // ASUS_BSP --- Maggie_Lee "I2C" // ASUS_BSP +++ Cliff_Yu "TOUCH" + { + .gpio = 16, + .settings = { + [GPIOMUX_ACTIVE] = &touch_reset, + [GPIOMUX_SUSPENDED] = &touch_reset, + }, + }, { .gpio = 17, .settings = { diff --git a/arch/arm/mach-msm/wi500q_sr_gpio_pinmux.h b/arch/arm/mach-msm/wi500q_sr_gpio_pinmux.h index e60c48154f4dedfbd9e34adfb629580a7b1b0b9b..ee1b037b70f3ce20aeea467c34f305f6aa17b4cb 100755 --- a/arch/arm/mach-msm/wi500q_sr_gpio_pinmux.h +++ b/arch/arm/mach-msm/wi500q_sr_gpio_pinmux.h @@ -66,6 +66,13 @@ static struct msm_gpiomux_config wi500q_sr_msm8226_gpio_configs[] __initdata= { }, // ASUS_BSP --- Maggie_Lee "I2C" // ASUS_BSP +++ Cliff_Yu "TOUCH" + { + .gpio = 16, + .settings = { + [GPIOMUX_ACTIVE] = &touch_reset, + [GPIOMUX_SUSPENDED] = &touch_reset, + }, + }, { .gpio = 17, .settings = { diff --git a/drivers/input/touchscreen/it7260_ts_i2c.c b/drivers/input/touchscreen/it7260_ts_i2c.c index e9cb98c54e730e193d3e36f1df9aae8566cfeee5..96eda9cf89bcd84638153cb901123aba128cc59a 100644 --- a/drivers/input/touchscreen/it7260_ts_i2c.c +++ b/drivers/input/touchscreen/it7260_ts_i2c.c @@ -470,6 +470,13 @@ static void chipLowPowerMode(bool low) queue_delayed_work(IT7260_wq, &gl_ts->touchidle_on_work, 500); } else { cancel_delayed_work(&gl_ts->touchidle_on_work); + + //Touch Reset + gpio_direction_output(16,1); + msleep(50); + gpio_direction_output(16,0); + msleep(50); + if (!allow_irq_wake){ smp_wmb(); disable_irq_wake(gl_ts->client->irq); @@ -866,7 +873,7 @@ static void readTouchDataPoint(void) } if ((pointData.palm & PD_PALM_FLAG_BIT) && !isDeviceSuspend && !hadPalmDown) { - if (jiffies - last_time_exit_low > HZ/5){ + if (jiffies - last_time_exit_low > HZ/4){ isDeviceSuspend = true; hadPalmDown = true; sendPalmEvt(); @@ -1061,6 +1068,7 @@ static int IT7260_ts_probe(struct i2c_client *client, const struct i2c_device_id struct IT7260_i2c_platform_data *pdata; uint8_t rsp[2]; int ret = -1; + int err; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { LOGE("need I2C_FUNC_I2C\n"); @@ -1177,6 +1185,11 @@ static int IT7260_ts_probe(struct i2c_client *client, const struct i2c_device_id } wake_lock_init(&touch_lock, WAKE_LOCK_SUSPEND, "touch-lock"); + err = gpio_request(16, "CTP_RST_N"); + if (err<0){ + printk("IT7260: gpio_request 16 error: %d\n",err); + } + devicePresent = true; i2cWriteNoReadyCheck(BUF_COMMAND, cmdStart, sizeof(cmdStart)); @@ -1380,6 +1393,7 @@ static int __init IT7260_ts_init(void) static void __exit IT7260_ts_exit(void) { i2c_del_driver(&IT7260_ts_driver); + gpio_free(16); #ifdef CONFIG_ASUS_UTILITY unregister_mode_notifier(&display_mode_notifier); #endif