From: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "H. Nikolaus Schaller" <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
Cc: "Sebastian Reichel" <sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Dmitry Torokhov"
<dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
"Benoît Cousson"
<bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
"Tony Lindgren" <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
"Russell King" <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
"Arnd Bergmann" <arnd-r2nGTMty4D4@public.gmane.org>,
"Michael Welling" <mwelling-EkmVulN54Sk@public.gmane.org>,
"Mika Penttilä"
<mika.penttila-MRsr7dthA9VWk0Htik3J/w@public.gmane.org>,
"Javier Martinez Canillas"
<javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>,
"Igor Grinberg"
<grinberg-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org>,
"Andrew F. Davis" <afd-l0cyMroinI0@public.gmane.org>,
"Mark Brown" <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Jonathan Cameron"
<jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v4 1/8] drivers:input:tsc2007: add new common binding names, pre-calibration, flipping and rotation
Date: Sun, 30 Oct 2016 22:39:21 -0500 [thread overview]
Message-ID: <CAL_JsqLhBwb4eJdrAqLLksovcfP1xm9RGTUQKVvF_WxJaMn4WA@mail.gmail.com> (raw)
In-Reply-To: <3D3CBADC-42F7-4A2B-9D0D-40A0649F79FB-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
On Tue, Oct 18, 2016 at 12:27 PM, H. Nikolaus Schaller
<hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> wrote:
> Hi Rob,
>
>> Am 18.10.2016 um 18:22 schrieb Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>:
>>
>> On Mon, Oct 17, 2016 at 8:57 AM, H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> wrote:
>>> commit b98abe52fa8e ("Input: add common DT binding for touchscreens")
>>> introduced common DT bindings for touchscreens [1] and a helper function to
>>> parse the DT.
>>>
>>> commit ed7c9870c9bc ("Input: of_touchscreen - add support for inverted / swapped axes")
>>> added another helper for parsing axis inversion and swapping
>>> and applying them to x and y coordinates.
>>>
>>> Both helpers have been integrated to accommodate any orientation of the
>>> touch panel in relation to the LCD.
>>
>> Please add the explanation of why this is a compatible change here.
>
> Can you please describe in more detail what you are missing here?
You stop handling ti,fuzzx for example. So the default driver value
will be used and this is okay because...
Seems like you would have a regression in behavior if the fuzz values
specified in an existing DT are ignored.
> The patch simply makes use of the generic helper function introduced by the
> two patches cited above and is therefore automatically compatible if none of
> the new properties is defined.
>
> The tsc2007 didn't have these features before. So what should we say
> about compatibility?
It certainly had the fuzz features before.
>>> -- ti,max-rt: maximum pressure.
>>> -- ti,fuzzx: specifies the absolute input fuzz x value.
>>> - If set, it will permit noise in the data up to +- the value given to the fuzz
>>> - parameter, that is used to filter noise from the event stream.
>>> -- ti,fuzzy: specifies the absolute input fuzz y value.
>>> -- ti,fuzzz: specifies the absolute input fuzz z value.
>>> +- ti,max-rt: maximum pressure resistance above which samples are ignored
>>> + (default: 4095).
>>> +- ti,report-resistance: report resistance (no pressure = max_rt) instead
>>> + of pressure (no pressure = 0).
>>> +- ti,min-x: minimum value reported by X axis ADC (default 0).
>>> +- ti,max-x: maximum value reported by X axis ADC (default 4095).
>>> +- ti,min-y: minimum value reported by Y axis ADC (default 0).
>>> +- ti,max-y: maximum value reported by Y axis ADC (default 4095).
>>
>> I thought these were going to be common? I think they should be.
>
> Yes, we had discussed that before.
>
> In a second thought, I found that they are not even existing for the different
> touch chip drivers that are around. And some chip might not need them (because
> e.g. min/max are constants or defined my means outside the DT or the chip itself
> can store them in NV memory).
>
> And, since they define ADC raw-values, they are very closely related to the
> individual chip, so that I am not sure if it is really necessary to make
> them common. At least if they are properly documented in the bindings for
> the specific chip they can have different names without disturbing each
> other.
They wouldn't disturb each other, but then there is no chance to have
common parsing either.
> So I think it is perfectly reasonable to define common bindings towards
> the input event layer (e.g. size, fuzz, swapping, inversion) and support
> them by common code which bakes raw coordinates into input events. The latest
> helper functions already do most of that fully automatic.
I could argue that size in pixels has no business being in DT. That's
a property of the panel the touchscreen is glued to. I guess in some
cases, the controller is internally scaling the ADC values.
> Next, I had simply copied them from the ads7846 driver where they
> exist for a long time. So this is sort of "common", at least for two different
> chips now. See also patch 6/8 of this series which adds the common properties
> to the ads7846 as well.
>
> For more reference about the existing bindings:
>
> Documentation/devicetree/bindings/input/ads7846.txt
>
> (btw I think someone should move them to bindings/input/touchscreen).
Patches welcome.
> It appears as if there is some overlap of the new generic properties (for x/y
> swapping) with the old ads7846 properties, but that is something you had
> already proposed a while ago to make me the driver recognize both properties to
> stay compatible with older DT files.
>
> So if we now rename the min/max-x/y properties for the tsc2007 we have to rename
> them for the ads7846 (and maybe others) as well, which might break out-of-tree
> ads7846 devices or leads to more complex code for handling of property aliases.
We don't have to rename them for ads7846. That's already baked. But
there's a trend here. You're defining the same property. Use a common
name, so when the 3rd binding comes along needing the same thing, we
already have a common binding. If we're catching this on only the 2nd
binding, we're doing pretty good.
Rob
next prev parent reply other threads:[~2016-10-31 3:39 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-17 13:57 [PATCH v4 0/8] drivers: touchscreen: tsc2007 and ads7846/tsc2046 improvements (use common touchscreen bindings, pre-calibration, spi fix and provide iio raw values) H. Nikolaus Schaller
2016-10-17 13:57 ` [PATCH v4 1/8] drivers:input:tsc2007: add new common binding names, pre-calibration, flipping and rotation H. Nikolaus Schaller
[not found] ` <76746b85957c9f3ef7101a7ee883898a414cabd8.1476712675.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-10-18 16:22 ` Rob Herring
2016-10-18 17:27 ` H. Nikolaus Schaller
[not found] ` <3D3CBADC-42F7-4A2B-9D0D-40A0649F79FB-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-10-31 3:39 ` Rob Herring [this message]
2016-11-11 19:01 ` H. Nikolaus Schaller
2016-10-17 13:57 ` [PATCH v4 2/8] drivers:input:tsc2007: send pendown and penup only once like ads7846(+tsc2046) driver does H. Nikolaus Schaller
[not found] ` <cover.1476712675.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-10-17 13:57 ` [PATCH v4 3/8] drivers:input:tsc2007: check for presence and power down tsc2007 during probe H. Nikolaus Schaller
2016-10-17 13:57 ` [PATCH v4 5/8] DT:omap3+tsc2007: use new common touchscreen bindings H. Nikolaus Schaller
2016-10-17 13:57 ` [PATCH v4 7/8] drivers:input:ads7846(+tsc2046): fix spi module table H. Nikolaus Schaller
2016-10-17 15:54 ` Andrew F. Davis
[not found] ` <acdf452f-01f2-27df-11c5-bb8db002394a-l0cyMroinI0@public.gmane.org>
2016-10-17 16:52 ` H. Nikolaus Schaller
2016-10-17 13:57 ` [PATCH v4 8/8] DT:omap3+ads7846: use new common touchscreen bindings H. Nikolaus Schaller
2016-10-17 13:57 ` [PATCH v4 4/8] drivers:input:tsc2007: add iio interface to read external ADC input and temperature H. Nikolaus Schaller
[not found] ` <4d3c600bf0a6b75a74212a103bf31525505290a0.1476712675.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-10-22 18:33 ` Jonathan Cameron
2016-10-22 20:46 ` H. Nikolaus Schaller
2016-10-23 9:24 ` Jonathan Cameron
2016-10-23 9:57 ` H. Nikolaus Schaller
2016-10-23 18:34 ` H. Nikolaus Schaller
[not found] ` <F0CB8C7F-29FD-41DF-A652-9D1AF7824D5F-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-10-23 19:00 ` Jonathan Cameron
2016-10-23 19:11 ` H. Nikolaus Schaller
2016-10-24 19:14 ` H. Nikolaus Schaller
2016-10-25 16:54 ` Jonathan Cameron
[not found] ` <976C7328-A6AA-4CD5-AAAA-3B14BA3BD793-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2016-10-23 18:50 ` Jonathan Cameron
2016-10-17 13:57 ` [PATCH v4 6/8] drivers:input:ads7846(+tsc2046): add new common binding names, pre-calibration and flipping H. Nikolaus Schaller
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=CAL_JsqLhBwb4eJdrAqLLksovcfP1xm9RGTUQKVvF_WxJaMn4WA@mail.gmail.com \
--to=robh+dt-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=afd-l0cyMroinI0@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=grinberg-UTxiZqZC01RS1MOuV/RT9w@public.gmane.org \
--cc=hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org \
--cc=javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
--cc=linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=mika.penttila-MRsr7dthA9VWk0Htik3J/w@public.gmane.org \
--cc=mwelling-EkmVulN54Sk@public.gmane.org \
--cc=sre-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
/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 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).