* [PATCH RESEND] Input: tsc200x-core - Add axis inversion and swapping support
@ 2022-02-09 22:39 Yunus Bas
2022-02-10 1:03 ` Dmitry Torokhov
0 siblings, 1 reply; 3+ messages in thread
From: Yunus Bas @ 2022-02-09 22:39 UTC (permalink / raw)
To: dmitry.torokhov, yuehaibing, linux-input; +Cc: u.kleine-koenig, linux-kernel
Since Commit ed7c9870c9bc ("Input: of_touchscreen - add support for
inverted / swapped axes"), the of_touchscreen interface supports axis
inverting and swapping through Devicetree properties. Make use of this
feature.
Signed-off-by: Yunus Bas <y.bas@phytec.de>
---
drivers/input/touchscreen/tsc200x-core.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/input/touchscreen/tsc200x-core.c b/drivers/input/touchscreen/tsc200x-core.c
index 27810f6c69f6..72c7258b93a5 100644
--- a/drivers/input/touchscreen/tsc200x-core.c
+++ b/drivers/input/touchscreen/tsc200x-core.c
@@ -88,6 +88,8 @@ struct tsc200x {
int in_z1;
int in_z2;
+ struct touchscreen_properties prop;
+
spinlock_t lock;
struct timer_list penup_timer;
@@ -113,8 +115,7 @@ static void tsc200x_update_pen_state(struct tsc200x *ts,
int x, int y, int pressure)
{
if (pressure) {
- input_report_abs(ts->idev, ABS_X, x);
- input_report_abs(ts->idev, ABS_Y, y);
+ touchscreen_report_pos(ts->idev, &ts->prop, x, y, false);
input_report_abs(ts->idev, ABS_PRESSURE, pressure);
if (!ts->pen_down) {
input_report_key(ts->idev, BTN_TOUCH, !!pressure);
@@ -533,7 +534,7 @@ int tsc200x_probe(struct device *dev, int irq, const struct input_id *tsc_id,
input_set_abs_params(input_dev, ABS_PRESSURE,
0, MAX_12BIT, TSC200X_DEF_P_FUZZ, 0);
- touchscreen_parse_properties(input_dev, false, NULL);
+ touchscreen_parse_properties(input_dev, false, &ts->prop);
/* Ensure the touchscreen is off */
tsc200x_stop_scan(ts);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] Input: tsc200x-core - Add axis inversion and swapping support
2022-02-09 22:39 [PATCH RESEND] Input: tsc200x-core - Add axis inversion and swapping support Yunus Bas
@ 2022-02-10 1:03 ` Dmitry Torokhov
2022-02-10 8:56 ` Yunus Bas
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Torokhov @ 2022-02-10 1:03 UTC (permalink / raw)
To: Yunus Bas; +Cc: yuehaibing, linux-input, u.kleine-koenig, linux-kernel
On Wed, Feb 09, 2022 at 11:39:33PM +0100, Yunus Bas wrote:
> Since Commit ed7c9870c9bc ("Input: of_touchscreen - add support for
> inverted / swapped axes"), the of_touchscreen interface supports axis
> inverting and swapping through Devicetree properties. Make use of this
> feature.
>
> Signed-off-by: Yunus Bas <y.bas@phytec.de>
Applied, thank you, however I believe we also need to adjust
Documentation/devicetree/bindings/input/touchscreen/ti,tsc2005.yamli to
allow these properties.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] Input: tsc200x-core - Add axis inversion and swapping support
2022-02-10 1:03 ` Dmitry Torokhov
@ 2022-02-10 8:56 ` Yunus Bas
0 siblings, 0 replies; 3+ messages in thread
From: Yunus Bas @ 2022-02-10 8:56 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: yuehaibing, linux-input, linux-kernel, u.kleine-koenig
Hi Dmitry,
Am Mittwoch, dem 09.02.2022 um 17:03 -0800 schrieb Dmitry Torokhov:
> On Wed, Feb 09, 2022 at 11:39:33PM +0100, Yunus Bas wrote:
> > Since Commit ed7c9870c9bc ("Input: of_touchscreen - add support for
> > inverted / swapped axes"), the of_touchscreen interface supports
> > axis
> > inverting and swapping through Devicetree properties. Make use of
> > this
> > feature.
> >
> > Signed-off-by: Yunus Bas <y.bas@phytec.de>
>
> Applied, thank you, however I believe we also need to adjust
> Documentation/devicetree/bindings/input/touchscreen/ti,tsc2005.yamli
> to
> allow these properties.
Thank you for the note. I will update the documentation ASAP and send a
v2.
Regards
Yunus
>
> Thanks.
>
--
-Software Entwicklung-
PHYTEC Messtechnik GmbH
Robert-Koch-Str. 39
55129 Mainz
Germany
Tel.: +49 (0)6131 9221-466
Web: www.phytec.de
Sie finden uns auch auf: Facebook, LinkedIn, Xing, YouTube
PHYTEC Messtechnik GmbH | Robert-Koch-Str. 39 | 55129 Mainz, Germany
Geschäftsführer: Dipl.-Ing. Michael Mitezki, Dipl.-Ing. Bodo Huber |
Handelsregister Mainz HRB 4656 | Finanzamt Mainz | St.Nr. 266500608, DE
149059855
This E-Mail may contain confidential or privileged information. If you
are not the intended recipient (or have received this E-Mail in error)
please notify the sender immediately and destroy this E-Mail. Any
unauthorized copying, disclosure or distribution of the material in
this E-Mail is strictly forbidden.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-10 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 22:39 [PATCH RESEND] Input: tsc200x-core - Add axis inversion and swapping support Yunus Bas
2022-02-10 1:03 ` Dmitry Torokhov
2022-02-10 8:56 ` Yunus Bas
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).