mako: touch: reset_pin control during touch power control.

This commit is to assert/de-assert reset signal during suspend/resume.
Without this commit, there is a 2~3mA of leakage current from reset pin
to touch contorller IC.

Change-Id: I32717412b1dec13996aa986c7939c76dd6453ebb
This commit is contained in:
ks.kwon
2012-08-07 13:50:18 +09:00
committed by Iliyan Malchev
parent 43e28b253f
commit 18ccbbdbcc
2 changed files with 7 additions and 10 deletions

View File

@@ -462,7 +462,7 @@ static int accuracy_filter_func(struct lge_touch_data *ts)
/* finish the accuracy_filter */
if (ts->accuracy_filter.finish_filter == 1 &&
(ts->accuracy_filter.his_data.count >
(ts->accuracy_filter.his_data.count >
ts->accuracy_filter.touch_max_count ||
ts->ts_data.total_num != 1)) {
ts->accuracy_filter.finish_filter = 0;
@@ -1674,7 +1674,7 @@ static int touch_probe(struct i2c_client *client,
TOUCH_ERR_MSG("FAIL: touch_reset gpio_request\n");
goto err_assign_platform_data;
}
gpio_direction_output(ts->pdata->reset_pin, 1);
gpio_direction_output(ts->pdata->reset_pin, 0);
}
atomic_set(&ts->device_init, 0);

View File

@@ -68,7 +68,7 @@
#define DEVICE_CONTROL_REG (ts->common_dsc.control_base) /* Device Control */
#define DEVICE_CONTROL_NORMAL_OP 0x00 /* sleep mode : go to doze mode after 500 ms */
#define DEVICE_CONTROL_SLEEP 0x01 /* sleep mode : go to sleep */
#define DEVICE_CONTROL_SLEEP 0x01 /* sleep mode : go to sleep */
#define DEVICE_CONTROL_SPECIFIC 0x02 /* sleep mode : go to doze mode after 5 sec */
#define DEVICE_CONTROL_NOSLEEP 0x04
#define DEVICE_CONTROL_CONFIGURED 0x80
@@ -666,13 +666,15 @@ int synaptics_ts_power(struct i2c_client* client, int power_ctrl)
switch (power_ctrl) {
case POWER_OFF:
if (ts->pdata->reset_pin > 0)
gpio_set_value(ts->pdata->reset_pin, 0);
if (ts->pdata->pwr->use_regulator) {
regulator_disable(ts->regulator_vio);
regulator_disable(ts->regulator_vdd);
}
else
ts->pdata->pwr->power(0);
break;
case POWER_ON:
if (ts->pdata->pwr->use_regulator) {
@@ -682,13 +684,8 @@ int synaptics_ts_power(struct i2c_client* client, int power_ctrl)
else
ts->pdata->pwr->power(1);
/* P2 H/W bug fix */
if (ts->pdata->reset_pin > 0) {
msleep(10);
gpio_set_value(ts->pdata->reset_pin, 0);
msleep(ts->pdata->role->reset_delay);
if (ts->pdata->reset_pin > 0)
gpio_set_value(ts->pdata->reset_pin, 1);
}
break;
case POWER_SLEEP:
if (unlikely(touch_i2c_write_byte(client, DEVICE_CONTROL_REG,