From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Cc: Dmitry Osipenko <digetx@gmail.com>,
Henrik Rydberg <rydberg@bitmath.org>,
James Chen <james.chen@emc.com.tw>,
Johnny Chuang <johnny.chuang@emc.com.tw>,
Rob Herring <robh+dt@kernel.org>,
Scott Liu <scott.liu@emc.com.tw>,
David Heidelberg <david@ixit.cz>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 4/9] input: elants: override touchscreen info with DT properties
Date: Sat, 25 Apr 2020 22:12:54 -0700 [thread overview]
Message-ID: <20200426051254.GR125362@dtor-ws> (raw)
In-Reply-To: <20200426051122.GQ125362@dtor-ws>
On Sat, Apr 25, 2020 at 10:11:22PM -0700, Dmitry Torokhov wrote:
> On Mon, Apr 13, 2020 at 03:32:24PM +0200, Michał Mirosław wrote:
> > Allow overriding of information from hardware and support additional
> > common DT properties like axis inversion. This is required for eg.
> > Nexus 7 and TF300T where the programmed values in firmware differ
> > from reality.
> >
> > Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> > [moved "prop" before DMA buffer]
> > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
>
> This needs a companion patch for the DT bindings.
Ah, sorry, I missed the fact that it was later in the sequence.
>
> > ---
> > drivers/input/touchscreen/elants_i2c.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
> > index fcd3d189f184..87d686ce08f2 100644
> > --- a/drivers/input/touchscreen/elants_i2c.c
> > +++ b/drivers/input/touchscreen/elants_i2c.c
> > @@ -32,6 +32,7 @@
> > #include <linux/slab.h>
> > #include <linux/firmware.h>
> > #include <linux/input/mt.h>
> > +#include <linux/input/touchscreen.h>
> > #include <linux/acpi.h>
> > #include <linux/of.h>
> > #include <linux/gpio/consumer.h>
> > @@ -150,6 +151,7 @@ struct elants_data {
> > unsigned int y_res;
> > unsigned int x_max;
> > unsigned int y_max;
> > + struct touchscreen_properties prop;
> >
> > enum elants_state state;
> > enum elants_iap_mode iap_mode;
> > @@ -894,8 +896,7 @@ static void elants_i2c_mt_event(struct elants_data *ts, u8 *buf,
> >
> > input_mt_slot(input, i);
> > input_mt_report_slot_state(input, MT_TOOL_FINGER, true);
> > - input_event(input, EV_ABS, ABS_MT_POSITION_X, x);
> > - input_event(input, EV_ABS, ABS_MT_POSITION_Y, y);
> > + touchscreen_report_pos(input, &ts->prop, x, y, true);
> > input_event(input, EV_ABS, ABS_MT_PRESSURE, p);
> > input_event(input, EV_ABS, ABS_MT_TOUCH_MAJOR, w);
> >
> > @@ -1329,6 +1330,8 @@ static int elants_i2c_probe(struct i2c_client *client,
> > input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->y_res);
> > input_abs_set_res(ts->input, ABS_MT_TOUCH_MAJOR, 1);
> >
> > + touchscreen_parse_properties(ts->input, true, &ts->prop);
> > +
> > error = input_register_device(ts->input);
> > if (error) {
> > dev_err(&client->dev,
> > --
> > 2.20.1
> >
>
> --
> Dmitry
--
Dmitry
next prev parent reply other threads:[~2020-04-26 5:12 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 13:32 [PATCH v3 0/9] input: elants: Support Asus TF300T touchscreen Michał Mirosław
2020-04-13 13:32 ` [PATCH v3 3/9] input: elants: remove unused axes Michał Mirosław
2020-04-26 4:52 ` Dmitry Torokhov
2020-04-26 5:07 ` Dmitry Osipenko
2020-04-26 11:21 ` Michał Mirosław
2020-04-26 15:39 ` Dmitry Osipenko
2020-04-26 15:41 ` Dmitry Osipenko
2020-04-26 16:11 ` Dmitry Osipenko
2020-04-26 16:12 ` Michał Mirosław
2020-04-26 16:14 ` Dmitry Osipenko
2020-04-13 13:32 ` [PATCH v3 2/9] input: elants: support old touch report format Michał Mirosław
2020-04-13 13:32 ` [PATCH v3 1/9] input: elants: document some registers and values Michał Mirosław
2020-04-13 13:32 ` [PATCH v3 4/9] input: elants: override touchscreen info with DT properties Michał Mirosław
2020-04-26 5:11 ` Dmitry Torokhov
2020-04-26 5:12 ` Dmitry Torokhov [this message]
2020-04-13 13:32 ` [PATCH v3 5/9] input: elants: refactor elants_i2c_execute_command() Michał Mirosław
2020-04-26 5:08 ` Dmitry Torokhov
2020-04-13 13:32 ` [PATCH v3 6/9] input: elants: read touchscreen size for EKTF3624 Michał Mirosław
2020-04-26 5:10 ` Dmitry Torokhov
2020-04-13 13:32 ` [PATCH v3 8/9] dt-bindings: input: elants-i2c: Document common touchscreen properties Michał Mirosław
2020-04-13 13:32 ` [PATCH v3 7/9] input: elants: support 0x66 reply opcode for reporting touches Michał Mirosław
2020-04-26 5:15 ` Dmitry Torokhov
2020-04-26 5:21 ` Dmitry Osipenko
2020-04-13 13:32 ` [PATCH v3 9/9] dt-bindings: input: elants-i2c: Document eKTF3624 Michał Mirosław
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200426051254.GR125362@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=david@ixit.cz \
--cc=digetx@gmail.com \
--cc=james.chen@emc.com.tw \
--cc=johnny.chuang@emc.com.tw \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mirq-linux@rere.qmqm.pl \
--cc=robh+dt@kernel.org \
--cc=rydberg@bitmath.org \
--cc=scott.liu@emc.com.tw \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.