Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: tsc2007 - rename function tsc2007_calculate_pressure

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>

authored by

H. Nikolaus Schaller and committed by
Dmitry Torokhov
deec586d c61ebe83

+6 -7
+1 -2
drivers/input/touchscreen/tsc2007.h
··· 85 85 }; 86 86 87 87 int tsc2007_xfer(struct tsc2007 *tsc, u8 cmd); 88 - u32 tsc2007_calculate_pressure(struct tsc2007 *tsc, 89 - struct ts_event *tc); 88 + u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc); 90 89 bool tsc2007_is_pen_down(struct tsc2007 *ts); 91 90 92 91 #if IS_ENABLED(CONFIG_TOUCHSCREEN_TSC2007_IIO)
+4 -4
drivers/input/touchscreen/tsc2007_core.c
··· 68 68 tsc2007_xfer(tsc, PWRDOWN); 69 69 } 70 70 71 - u32 tsc2007_calculate_pressure(struct tsc2007 *tsc, struct ts_event *tc) 71 + u32 tsc2007_calculate_resistance(struct tsc2007 *tsc, struct ts_event *tc) 72 72 { 73 73 u32 rt = 0; 74 74 ··· 77 77 tc->x = 0; 78 78 79 79 if (likely(tc->x && tc->z1)) { 80 - /* compute touch pressure resistance using equation #1 */ 80 + /* compute touch resistance using equation #1 */ 81 81 rt = tc->z2 - tc->z1; 82 82 rt *= tc->x; 83 83 rt *= tsc->x_plate_ohms; ··· 125 125 tsc2007_read_values(ts, &tc); 126 126 mutex_unlock(&ts->mlock); 127 127 128 - rt = tsc2007_calculate_pressure(ts, &tc); 128 + rt = tsc2007_calculate_resistance(ts, &tc); 129 129 130 130 if (!rt && !ts->get_pendown_state) { 131 131 /* ··· 138 138 139 139 if (rt <= ts->max_rt) { 140 140 dev_dbg(&ts->client->dev, 141 - "DOWN point(%4d,%4d), pressure (%4u)\n", 141 + "DOWN point(%4d,%4d), resistance (%4u)\n", 142 142 tc.x, tc.y, rt); 143 143 144 144 input_report_key(input, BTN_TOUCH, 1);
+1 -1
drivers/input/touchscreen/tsc2007_iio.c
··· 76 76 tc.x = tsc2007_xfer(tsc, READ_X); 77 77 tc.z1 = tsc2007_xfer(tsc, READ_Z1); 78 78 tc.z2 = tsc2007_xfer(tsc, READ_Z2); 79 - *val = tsc2007_calculate_pressure(tsc, &tc); 79 + *val = tsc2007_calculate_resistance(tsc, &tc); 80 80 break; 81 81 } 82 82 case 6: