Skip to content

Commit 6ef4ea3

Browse files
akemnadekhilman
authored andcommitted
Input: tsc2007 - accept standard properties
Only some driver-specific properties were accepted, change it to use the now-available standard properties which are found in devicetrees containing this chip. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20241205204413.2466775-2-akemnade@kernel.org Signed-off-by: Kevin Hilman <khilman@baylibre.com>
1 parent 40384c8 commit 6ef4ea3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/input/touchscreen/tsc2007.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifndef _TSC2007_H
2020
#define _TSC2007_H
2121

22+
#include <linux/input/touchscreen.h>
2223
struct gpio_desc;
2324

2425
#define TSC2007_MEASURE_TEMP0 (0x0 << 4)
@@ -63,6 +64,7 @@ struct tsc2007 {
6364

6465
struct i2c_client *client;
6566

67+
struct touchscreen_properties prop;
6668
u16 model;
6769
u16 x_plate_ohms;
6870
u16 max_rt;

drivers/input/touchscreen/tsc2007_core.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle)
142142
rt = ts->max_rt - rt;
143143

144144
input_report_key(input, BTN_TOUCH, 1);
145-
input_report_abs(input, ABS_X, tc.x);
146-
input_report_abs(input, ABS_Y, tc.y);
145+
touchscreen_report_pos(input, &ts->prop, tc.x, tc.y, false);
147146
input_report_abs(input, ABS_PRESSURE, rt);
148147

149148
input_sync(input);
@@ -339,9 +338,9 @@ static int tsc2007_probe(struct i2c_client *client)
339338
input_set_drvdata(input_dev, ts);
340339

341340
input_set_capability(input_dev, EV_KEY, BTN_TOUCH);
342-
343341
input_set_abs_params(input_dev, ABS_X, 0, MAX_12BIT, ts->fuzzx, 0);
344342
input_set_abs_params(input_dev, ABS_Y, 0, MAX_12BIT, ts->fuzzy, 0);
343+
touchscreen_parse_properties(input_dev, false, &ts->prop);
345344
input_set_abs_params(input_dev, ABS_PRESSURE, 0, MAX_12BIT,
346345
ts->fuzzz, 0);
347346

0 commit comments

Comments
 (0)