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

Configure Feed

Select the types of activity you want to include in your feed.

Input: atmel_mxt_ts - add support for generic touchscreen configurations

This provides support for generic touchscreen configuration options like
swapped-x-y, min-x, min-y, size-x, size-y, etc.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Link: https://lore.kernel.org/r/20250909054903.11519-3-clamor95@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Svyatoslav Ryhel and committed by
Dmitry Torokhov
fd321a86 b90d027a

+7 -4
+7 -4
drivers/input/touchscreen/atmel_mxt_ts.c
··· 19 19 #include <linux/firmware.h> 20 20 #include <linux/i2c.h> 21 21 #include <linux/input/mt.h> 22 + #include <linux/input/touchscreen.h> 22 23 #include <linux/interrupt.h> 23 24 #include <linux/irq.h> 24 25 #include <linux/of.h> ··· 356 355 enum mxt_suspend_mode suspend_mode; 357 356 358 357 u32 wakeup_method; 358 + 359 + struct touchscreen_properties prop; 359 360 }; 360 361 361 362 struct mxt_vb2_buffer { ··· 891 888 892 889 /* Touch active */ 893 890 input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, 1); 894 - input_report_abs(input_dev, ABS_MT_POSITION_X, x); 895 - input_report_abs(input_dev, ABS_MT_POSITION_Y, y); 891 + touchscreen_report_pos(input_dev, &data->prop, x, y, true); 896 892 input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude); 897 893 input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area); 898 894 } else { ··· 1012 1010 id, type, x, y, major, pressure, orientation); 1013 1011 1014 1012 input_mt_report_slot_state(input_dev, tool, 1); 1015 - input_report_abs(input_dev, ABS_MT_POSITION_X, x); 1016 - input_report_abs(input_dev, ABS_MT_POSITION_Y, y); 1013 + touchscreen_report_pos(input_dev, &data->prop, x, y, true); 1017 1014 input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, major); 1018 1015 input_report_abs(input_dev, ABS_MT_PRESSURE, pressure); 1019 1016 input_report_abs(input_dev, ABS_MT_DISTANCE, distance); ··· 2212 2211 input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 2213 2212 0, 255, 0, 0); 2214 2213 } 2214 + 2215 + touchscreen_parse_properties(input_dev, true, &data->prop); 2215 2216 2216 2217 /* For T15 and T97 Key Array */ 2217 2218 if (data->T15_reportid_min || data->T97_reportid_min) {