aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/ads7846.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 4d060321514f..ce6f48c695f5 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -517,7 +517,9 @@ static void ads7846_rx(void *ads)
517 if (x == MAX_12BIT) 517 if (x == MAX_12BIT)
518 x = 0; 518 x = 0;
519 519
520 if (likely(x && z1)) { 520 if (ts->model == 7843) {
521 Rt = ts->pressure_max / 2;
522 } else if (likely(x && z1)) {
521 /* compute touch pressure resistance using equation #2 */ 523 /* compute touch pressure resistance using equation #2 */
522 Rt = z2; 524 Rt = z2;
523 Rt -= z1; 525 Rt -= z1;
@@ -525,11 +527,9 @@ static void ads7846_rx(void *ads)
525 Rt *= ts->x_plate_ohms; 527 Rt *= ts->x_plate_ohms;
526 Rt /= z1; 528 Rt /= z1;
527 Rt = (Rt + 2047) >> 12; 529 Rt = (Rt + 2047) >> 12;
528 } else 530 } else {
529 Rt = 0; 531 Rt = 0;
530 532 }
531 if (ts->model == 7843)
532 Rt = ts->pressure_max / 2;
533 533
534 /* Sample found inconsistent by debouncing or pressure is beyond 534 /* Sample found inconsistent by debouncing or pressure is beyond
535 * the maximum. Don't report it to user space, repeat at least 535 * the maximum. Don't report it to user space, repeat at least