Thread (19 messages) 19 messages, 3 authors, 2019-12-11

Re: [PATCH 3/6] input: elants: support common touchscreen DT properties

From: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Date: 2019-12-11 03:28:22
Also in: lkml

On Tue, Dec 10, 2019 at 06:21:02PM +0300, Dmitry Osipenko wrote:
10.12.2019 05:38, Michał Mirosław пишет:
quoted
On Tue, Dec 10, 2019 at 04:03:18AM +0300, Dmitry Osipenko wrote:
quoted
10.12.2019 03:19, Michał Mirosław пишет:
quoted
Support common DT properties like axis inversions to complement
information obtained from device's firmware.a
[...]
quoted
quoted
@@ -1251,13 +1250,15 @@ static int elants_i2c_probe(struct i2c_client *client,
 	ts->input->name = "Elan Touchscreen";
 	ts->input->id.bustype = BUS_I2C;
 
+	touchscreen_parse_properties(ts->input, true, &ts->prop);
Shouldn't this function be invoked after setting the max x/y sizes with
the hardware values? That's what all other drivers do and then you won't
need to set the ts->prop.max_x/y above in the code.
This is done later in the series - this patch only adds axis inversion
support and ignores DT-provided sizes.
What is the reason of splitting it into two patches?

Perhaps I'm still missing something, but why something a bit more simple
like this wouldn't yield exactly the same result:
[...]

Originally I thought to skip probing the hardware when all info is
already provided in devicetree. This didn't happen, though. I'll take
your patch then, with a slight adjustment in "prop"'s position... And
the rest of them, so as to not duplicate the work. :-)

Best Regards,
Michał Mirosław
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help