Input: synaptics_i2c_rmi: Add sensitivity adjust option.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
This commit is contained in:
Arve Hjønnevåg
2009-07-14 20:51:49 -07:00
committed by Colin Cross
parent 07f13eb3c9
commit 4a5096fcd4
2 changed files with 8 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ struct synaptics_ts_data {
int snap_down[2];
int snap_up[2];
uint32_t flags;
int8_t sensitivity_adjust;
int (*power)(int on);
struct early_suspend early_suspend;
};
@@ -66,6 +67,11 @@ static int synaptics_init_panel(struct synaptics_ts_data *ts)
if (ret < 0)
printk(KERN_ERR "i2c_smbus_write_byte_data failed for No Clip Z\n");
ret = i2c_smbus_write_byte_data(ts->client, 0x44,
ts->sensitivity_adjust);
if (ret < 0)
pr_err("synaptics_ts: failed to set Sensitivity Adjust\n");
err_page_select_failed:
ret = i2c_smbus_write_byte_data(ts->client, 0xff, 0x04); /* page select = 0x04 */
if (ret < 0)
@@ -317,6 +323,7 @@ static int synaptics_ts_probe(
while (pdata->version > panel_version)
pdata++;
ts->flags = pdata->flags;
ts->sensitivity_adjust = pdata->sensitivity_adjust;
inactive_area_left = pdata->inactive_left;
inactive_area_right = pdata->inactive_right;
inactive_area_top = pdata->inactive_top;

View File

@@ -48,6 +48,7 @@ struct synaptics_i2c_rmi_platform_data {
uint32_t fuzz_y; /* 0x10000 = screen height */
int fuzz_p;
int fuzz_w;
int8_t sensitivity_adjust;
};
#endif /* _LINUX_SYNAPTICS_I2C_RMI_H */