Skip to content

Commit

Permalink
revert all touch sensitivity related modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Gokhan Moral committed Sep 11, 2012
1 parent 051fff5 commit 6c06bd1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 30 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-exynos/mach-u1.c
Original file line number Diff line number Diff line change
Expand Up @@ -4817,8 +4817,8 @@ static void mxt224_power_off(void)
Configuration for MXT224
*/
#define MXT224_THRESHOLD_BATT 40
#define MXT224_THRESHOLD_BATT_INIT 50
#define MXT224_THRESHOLD_CHRG 55
#define MXT224_THRESHOLD_BATT_INIT 55
#define MXT224_THRESHOLD_CHRG 70
#define MXT224_NOISE_THRESHOLD_BATT 30
#define MXT224_NOISE_THRESHOLD_CHRG 40
#define MXT224_MOVFILTER_BATT 11
Expand Down
48 changes: 20 additions & 28 deletions drivers/input/touchscreen/mxt224_u1.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ static u8 mov_hysti = 255;

#define CLEAR_MEDIAN_FILTER_ERROR
struct mxt224_data *copy_data;
struct mxt224_platform_data *copy_pdata;
int touch_is_pressed;
EXPORT_SYMBOL(touch_is_pressed);

Expand Down Expand Up @@ -489,27 +488,25 @@ static void mxt224_ta_probe(bool ta_status)
}

if (ta_status) {
copy_data->threshold = copy_pdata->tchthr_charging;
calcfg_dis = copy_pdata->calcfg_charging_e;
calcfg_en = copy_pdata->calcfg_charging_e | 0x20;
noise_threshold = copy_pdata->noisethr_charging;
movfilter = copy_pdata->movfilter_charging;
charge_time = copy_pdata->chrgtime_charging_e;
copy_data->threshold = copy_data->tchthr_charging;
calcfg_dis = copy_data->calcfg_charging_e;
calcfg_en = copy_data->calcfg_charging_e | 0x20;
noise_threshold = copy_data->noisethr_charging;
charge_time = copy_data->chrgtime_charging_e;
#ifdef CLEAR_MEDIAN_FILTER_ERROR
copy_data->gErrCondition = ERR_RTN_CONDITION_MAX;
copy_data->noise_median.mferr_setting = false;
#endif
} else {
if (copy_data->boot_or_resume == 1)
copy_data->threshold = copy_pdata->tchthr_batt_init;
copy_data->threshold = copy_data->tchthr_batt_init;
else
copy_data->threshold = copy_pdata->tchthr_batt;
copy_data->threshold_e = copy_pdata->tchthr_batt_e;
calcfg_dis = copy_pdata->calcfg_batt_e;
calcfg_en = copy_pdata->calcfg_batt_e | 0x20;
noise_threshold = copy_pdata->noisethr_batt;
movfilter = copy_pdata->movfilter_batt;
charge_time = copy_pdata->chrgtime_batt_e;
copy_data->threshold = copy_data->tchthr_batt;
copy_data->threshold_e = copy_data->tchthr_batt_e;
calcfg_dis = copy_data->calcfg_batt_e;
calcfg_en = copy_data->calcfg_batt_e | 0x20;
noise_threshold = copy_data->noisethr_batt;
charge_time = copy_data->chrgtime_batt_e;
#ifdef CLEAR_MEDIAN_FILTER_ERROR
copy_data->gErrCondition = ERR_RTN_CONDITION_IDLE;
copy_data->noise_median.mferr_count = 0;
Expand Down Expand Up @@ -539,7 +536,7 @@ static void mxt224_ta_probe(bool ta_status)
obj_address + (u16) register_address,
size_one, &value);
/*move Filter */
value = copy_pdata->movfilter_batt_e;
value = copy_data->movfilter_batt_e;
register_address = 13;
write_mem(copy_data,
obj_address + (u16) register_address,
Expand Down Expand Up @@ -686,11 +683,6 @@ static void mxt224_ta_probe(bool ta_status)
(u8) size_one, &val);
printk(KERN_ERR "[TSP]TA_probe MXT224 T%d Byte%d is %d\n", 9,
register_address, val);

value = (u8) movfilter;
register_address = 13;
write_mem(copy_data, obj_address + (u16) register_address,
size_one, &value);

// if 255, it's not modified. by tegrak
if (mov_hysti != 255) {
Expand Down Expand Up @@ -3270,9 +3262,9 @@ static ssize_t tsp_threshold_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
if (copy_data->mxt_version_disp == 0x80)
return sprintf(buf, "%u\n", copy_pdata->tchthr_batt);
return sprintf(buf, "%u\n", copy_data->threshold);
else
return sprintf(buf, "%u\n", copy_pdata->tchthr_batt_e);
return sprintf(buf, "%u\n", copy_data->threshold_e);
}

static ssize_t tsp_threshold_store(struct device *dev,
Expand All @@ -3288,6 +3280,11 @@ static ssize_t tsp_threshold_store(struct device *dev,
u16 size_one;
int threshold;

if (copy_data->mxt_version_disp == 0x80)
threshold = copy_data->threshold;
else
threshold = copy_data->threshold_e;

if (sscanf(buf, "%d", &threshold) == 1) {
printk(KERN_ERR "[TSP] threshold value %d\n",
threshold);
Expand All @@ -3296,10 +3293,6 @@ static ssize_t tsp_threshold_store(struct device *dev,
&size_one, &address);
size_one = 1;
value = (u8) threshold;
if (copy_data->mxt_version_disp == 0x80)
copy_pdata->tchthr_batt = threshold;
else
copy_pdata->tchthr_batt_e = threshold;
write_mem(copy_data, address + (u16) object_register, size_one,
&value);
read_mem(copy_data, address + (u16) object_register,
Expand Down Expand Up @@ -3931,7 +3924,6 @@ static int __devinit mxt224_probe(struct i2c_client *client,
data->tsp_config_version = "20111215";

copy_data = data;
copy_pdata = pdata;

if (data->family_id == 0x80) { /*MXT-224 */
tsp_config = pdata->config;
Expand Down

0 comments on commit 6c06bd1

Please sign in to comment.