Input: tsc2007 - rename function tsc2007_calculate_pressure
authorH. Nikolaus Schaller <hns@goldelico.com>
Thu, 23 Feb 2017 07:49:02 +0000 (23:49 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 23 Feb 2017 07:55:07 +0000 (23:55 -0800)
Rename tsc2007_calculate_pressure to tsc2007_calculate_resistance because
that is what it does.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/tsc2007.h
drivers/input/touchscreen/tsc2007_core.c
drivers/input/touchscreen/tsc2007_iio.c

index 474bd29d62423c25d6837e982e0474dd90bd73fb..30fdf5b04a6ba0a658676f286eb399df416eab5c 100644 (file)
@@ -85,8 +85,7 @@ struct tsc2007 {
 };
 
 int tsc2007_xfer(struct tsc2007 *tsc, u8 cmd);
-u32 tsc2007_calculate_pressure(struct tsc2007 *tsc,
-                                       struct ts_event *tc);
+u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc);
 bool tsc2007_is_pen_down(struct tsc2007 *ts);
 
 #if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2007_IIO)
index 98dbefc3357d08f30e0eb13d56095c729d3fd6c7..30b53ca95aec3d04d61edbabe17a298cae6bd8eb 100644 (file)
@@ -68,7 +68,7 @@ static void tsc2007_read_values(struct tsc2007 *tsc, struct ts_event *tc)
        tsc2007_xfer(tsc, PWRDOWN);
 }
 
-u32 tsc2007_calculate_pressure(struct tsc2007 *tsc, struct ts_event *tc)
+u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc)
 {
        u32 rt = 0;
 
@@ -77,7 +77,7 @@ u32 tsc2007_calculate_pressure(struct tsc2007 *tsc, struct ts_event *tc)
                tc->x = 0;
 
        if (likely(tc->x && tc->z1)) {
-               /* compute touch pressure resistance using equation #1 */
+               /* compute touch resistance using equation #1 */
                rt = tc->z2 - tc->z1;
                rt *= tc->x;
                rt *= tsc->x_plate_ohms;
@@ -125,7 +125,7 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
                tsc2007_read_values(ts, &tc);
                mutex_unlock(&ts->mlock);
 
-               rt = tsc2007_calculate_pressure(ts, &tc);
+               rt = tsc2007_calculate_resistance(ts, &tc);
 
                if (!rt && !ts->get_pendown_state) {
                        /*
@@ -138,7 +138,7 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
 
                if (rt <= ts->max_rt) {
                        dev_dbg(&ts->client->dev,
-                               "DOWN point(%4d,%4d), pressure (%4u)\n",
+                               "DOWN point(%4d,%4d), resistance (%4u)\n",
                                tc.x, tc.y, rt);
 
                        input_report_key(input, BTN_TOUCH, 1);
index 0ec3f28d04576ff52e362823cb45ebbfcea2f3b5..27b25a9fce8300cdb332ab4cf7d05d5c24a2d683 100644 (file)
@@ -76,7 +76,7 @@ static int tsc2007_read_raw(struct iio_dev *indio_dev,
                tc.x = tsc2007_xfer(tsc, READ_X);
                tc.z1 = tsc2007_xfer(tsc, READ_Z1);
                tc.z2 = tsc2007_xfer(tsc, READ_Z2);
-               *val = tsc2007_calculate_pressure(tsc, &tc);
+               *val = tsc2007_calculate_resistance(tsc, &tc);
                break;
        }
        case 6: