* [PATCH v2 0/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations
@ 2025-09-09 5:49 Svyatoslav Ryhel
2025-09-09 5:49 ` [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties Svyatoslav Ryhel
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-09 5:49 UTC (permalink / raw)
To: Nick Dyer, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Henrik Rydberg, Svyatoslav Ryhel, Linus Walleij
Cc: linux-input, devicetree, linux-kernel
This provides support for generic touchscreen configuration options like
swapped-x-y, min-x, min-y, size-x, size-y, etc.
---
Changes in v2:
- added schema adjustment
---
Svyatoslav Ryhel (2):
dt-bindings: input: maxtouch: add common touchscreen properties
input: touchscreen: atmel_mxt_ts: add support for generic touchscreen
configurations
.../devicetree/bindings/input/atmel,maxtouch.yaml | 3 ++-
drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
--
2.48.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties
2025-09-09 5:49 [PATCH v2 0/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
@ 2025-09-09 5:49 ` Svyatoslav Ryhel
2025-09-10 2:36 ` Rob Herring (Arm)
2025-09-09 5:49 ` [PATCH v2 2/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
2025-09-25 16:30 ` [PATCH v2 0/2] " Dmitry Torokhov
2 siblings, 1 reply; 5+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-09 5:49 UTC (permalink / raw)
To: Nick Dyer, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Henrik Rydberg, Svyatoslav Ryhel, Linus Walleij
Cc: linux-input, devicetree, linux-kernel
Since atmel,maxtouch describes touchscreens too, it should include common
touchscreen properties.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
Documentation/devicetree/bindings/input/atmel,maxtouch.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
index c40799355ed7..d79b254f1cde 100644
--- a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml
@@ -16,6 +16,7 @@ description: |
allOf:
- $ref: input.yaml#
+ - $ref: touchscreen/touchscreen.yaml#
properties:
compatible:
@@ -95,7 +96,7 @@ required:
- reg
- interrupts
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations
2025-09-09 5:49 [PATCH v2 0/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
2025-09-09 5:49 ` [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties Svyatoslav Ryhel
@ 2025-09-09 5:49 ` Svyatoslav Ryhel
2025-09-25 16:30 ` [PATCH v2 0/2] " Dmitry Torokhov
2 siblings, 0 replies; 5+ messages in thread
From: Svyatoslav Ryhel @ 2025-09-09 5:49 UTC (permalink / raw)
To: Nick Dyer, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Henrik Rydberg, Svyatoslav Ryhel, Linus Walleij
Cc: linux-input, devicetree, linux-kernel
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>
---
drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 322d5a3d40a0..fc624101147e 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -19,6 +19,7 @@
#include <linux/firmware.h>
#include <linux/i2c.h>
#include <linux/input/mt.h>
+#include <linux/input/touchscreen.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/of.h>
@@ -355,6 +356,8 @@ struct mxt_data {
enum mxt_suspend_mode suspend_mode;
u32 wakeup_method;
+
+ struct touchscreen_properties prop;
};
struct mxt_vb2_buffer {
@@ -888,8 +891,7 @@ static void mxt_proc_t9_message(struct mxt_data *data, u8 *message)
/* Touch active */
input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, 1);
- input_report_abs(input_dev, ABS_MT_POSITION_X, x);
- input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
+ touchscreen_report_pos(input_dev, &data->prop, x, y, true);
input_report_abs(input_dev, ABS_MT_PRESSURE, amplitude);
input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, area);
} else {
@@ -1010,8 +1012,7 @@ static void mxt_proc_t100_message(struct mxt_data *data, u8 *message)
id, type, x, y, major, pressure, orientation);
input_mt_report_slot_state(input_dev, tool, 1);
- input_report_abs(input_dev, ABS_MT_POSITION_X, x);
- input_report_abs(input_dev, ABS_MT_POSITION_Y, y);
+ touchscreen_report_pos(input_dev, &data->prop, x, y, true);
input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, major);
input_report_abs(input_dev, ABS_MT_PRESSURE, pressure);
input_report_abs(input_dev, ABS_MT_DISTANCE, distance);
@@ -2212,6 +2213,8 @@ static int mxt_initialize_input_device(struct mxt_data *data)
0, 255, 0, 0);
}
+ touchscreen_parse_properties(input_dev, true, &data->prop);
+
/* For T15 and T97 Key Array */
if (data->T15_reportid_min || data->T97_reportid_min) {
for (i = 0; i < data->t15_num_keys; i++)
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties
2025-09-09 5:49 ` [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties Svyatoslav Ryhel
@ 2025-09-10 2:36 ` Rob Herring (Arm)
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2025-09-10 2:36 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: linux-input, Krzysztof Kozlowski, Conor Dooley, Dmitry Torokhov,
Henrik Rydberg, devicetree, linux-kernel, Nick Dyer,
Linus Walleij
On Tue, 09 Sep 2025 08:49:02 +0300, Svyatoslav Ryhel wrote:
> Since atmel,maxtouch describes touchscreens too, it should include common
> touchscreen properties.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> Documentation/devicetree/bindings/input/atmel,maxtouch.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations
2025-09-09 5:49 [PATCH v2 0/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
2025-09-09 5:49 ` [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties Svyatoslav Ryhel
2025-09-09 5:49 ` [PATCH v2 2/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
@ 2025-09-25 16:30 ` Dmitry Torokhov
2 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2025-09-25 16:30 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Nick Dyer, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Henrik Rydberg, Linus Walleij, linux-input, devicetree,
linux-kernel
On Tue, Sep 09, 2025 at 08:49:01AM +0300, Svyatoslav Ryhel wrote:
> This provides support for generic touchscreen configuration options like
> swapped-x-y, min-x, min-y, size-x, size-y, etc.
>
> ---
> Changes in v2:
> - added schema adjustment
Applied the lot, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-25 16:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 5:49 [PATCH v2 0/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
2025-09-09 5:49 ` [PATCH v2 1/2] dt-bindings: input: maxtouch: add common touchscreen properties Svyatoslav Ryhel
2025-09-10 2:36 ` Rob Herring (Arm)
2025-09-09 5:49 ` [PATCH v2 2/2] input: touchscreen: atmel_mxt_ts: add support for generic touchscreen configurations Svyatoslav Ryhel
2025-09-25 16:30 ` [PATCH v2 0/2] " Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).