From: H. Nikolaus Schaller <hidden> Date: 2017-02-20 16:57:32
tsc2007 reports the touch resistance as ABS_PRESSURE, which jumps
to its maximum for light touch and goes down for increasing pressure.
This is not consistent with other touch drivers and not what one would
expect.
Additionally the name of the function tsc2007_calculate_pressure()
is misleading since the formula calculates an estimate for the touch
screen resistance. So it is renamed without changing the function.
While this patch changes the values reported to userspace,
ABS_PRESSURE is used rarely by userspace. Most software only
relies on BTN_TOUCH (boolean), which is not affected by this
patch. Some graphics software makes use of the interface and
does not work correctly with the currently used inverted
behaviour.
Note: this patch series assumes to be merged after
"Input: tsc2007 - add iio interface to read external ADC input and temperature"
because that one renames tsc2007.c to tsc2007_core.c
H. Nikolaus Schaller (3):
Input: tsc2007 - rename function tsc2007_calculate_pressure to
tsc2007_calculate_resistance because that is what it does
Input: tsc2007 - correctly report pressure and not resistance to user
space
Input: tsc2007 - add a property "ti,report-resistance" to restore the
old pressure reporting state if needed.
.../devicetree/bindings/input/touchscreen/tsc2007.txt | 2 ++
drivers/input/touchscreen/tsc2007.h | 1 +
drivers/input/touchscreen/tsc2007_core.c | 14 ++++++++++----
3 files changed, 13 insertions(+), 4 deletions(-)
--
2.7.3
@@ -14,6 +14,8 @@ Optional properties: - interrupts: (gpio) interrupt to which the chip is connected (see interrupt binding[0]). - ti,max-rt: maximum pressure.+- ti,report-resistance: report resistance (no pressure = max_rt) instead+ of pressure (no pressure = 0). - 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.
From: H. Nikolaus Schaller <hidden> Date: 2017-02-20 16:57:30
previously, tsc2007 will report as ABS_PRESSURE:
0 for no pressure (resistance infinite)
high value for soft pressure (high resistance)
low value for firm pressure (lower resistance)
This does not matter for most applications (e.g. GUI, Menu, Scrolling
etc.) where the ABS_PRESSURE is ignored and only BTN_TOUCH is processed
to detect screen taps.
Only some special graphics applications read the pressure channel and
they will be mixed up by this non-monotonic relation.
So we fix it to become:
0 for no pressure (resistance infinite)
low value for soft pressure (high resistance)
high value for firm pressure (lower resistance)
While this patch changes the values reported to userspace,
ABS_PRESSURE is used rarely by userspace. Most software only
relies on BTN_TOUCH (boolean), which is not affected by this
patch. Some graphics software makes use of the interface and
does not work correctly with the currently used inverted
behaviour.
Signed-off-by: H. Nikolaus Schaller <redacted>
---
drivers/input/touchscreen/tsc2007_core.c | 2 ++
1 file changed, 2 insertions(+)
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: H. Nikolaus Schaller <hidden> Date: 2017-02-21 11:44:04
Hi Pavel,
Am 21.02.2017 um 12:07 schrieb Pavel Machek [off-list ref]:
On Mon 2017-02-20 17:56:36, H. Nikolaus Schaller wrote:
quoted
Signed-off-by: H. Nikolaus Schaller <redacted>
No. device tree is for hardware description, not kernel configuration.
Yes, I agree. A new Kernel CONFIG would be better in this case.
I just did copy&paste from the old patch set without thinking that far.
Would
CONFIG_TSC2007_REPORT_RAW_RESISTANCE_AS_PRESSURE
be ok?
BR and thanks,
Nikolaus
From: Sebastian Reichel <sre@kernel.org> Date: 2017-02-21 17:14:09
Hi,
On Mon, Feb 20, 2017 at 05:56:35PM +0100, H. Nikolaus Schaller wrote:
quoted hunk
previously, tsc2007 will report as ABS_PRESSURE:
0 for no pressure (resistance infinite)
high value for soft pressure (high resistance)
low value for firm pressure (lower resistance)
This does not matter for most applications (e.g. GUI, Menu, Scrolling
etc.) where the ABS_PRESSURE is ignored and only BTN_TOUCH is processed
to detect screen taps.
Only some special graphics applications read the pressure channel and
they will be mixed up by this non-monotonic relation.
So we fix it to become:
0 for no pressure (resistance infinite)
low value for soft pressure (high resistance)
high value for firm pressure (lower resistance)
While this patch changes the values reported to userspace,
ABS_PRESSURE is used rarely by userspace. Most software only
relies on BTN_TOUCH (boolean), which is not affected by this
patch. Some graphics software makes use of the interface and
does not work correctly with the currently used inverted
behaviour.
Signed-off-by: H. Nikolaus Schaller <redacted>
---
drivers/input/touchscreen/tsc2007_core.c | 2 ++
1 file changed, 2 insertions(+)
From: Sebastian Reichel <sre@kernel.org> Date: 2017-02-21 17:20:05
Hi,
On Tue, Feb 21, 2017 at 12:43:28PM +0100, H. Nikolaus Schaller wrote:
quoted
Am 21.02.2017 um 12:07 schrieb Pavel Machek [off-list ref]:
On Mon 2017-02-20 17:56:36, H. Nikolaus Schaller wrote:
quoted
Signed-off-by: H. Nikolaus Schaller <redacted>
No. device tree is for hardware description, not kernel configuration.
Yes, I agree. A new Kernel CONFIG would be better in this case.
I just did copy&paste from the old patch set without thinking that far.
Would
CONFIG_TSC2007_REPORT_RAW_RESISTANCE_AS_PRESSURE
be ok?
I guess either a CONFIG or a module parameter may be used to provide
the previous (broken) behaviour. I suggest to ignore the problem
until its reported, though. There is a high chance, that nobody will
notice the change at all / nobody needs the compat layer.
-- Sebastian
On Tue, Feb 21, 2017 at 06:13:32PM +0100, Sebastian Reichel wrote:
Hi,
On Mon, Feb 20, 2017 at 05:56:35PM +0100, H. Nikolaus Schaller wrote:
quoted
previously, tsc2007 will report as ABS_PRESSURE:
0 for no pressure (resistance infinite)
high value for soft pressure (high resistance)
low value for firm pressure (lower resistance)
This does not matter for most applications (e.g. GUI, Menu, Scrolling
etc.) where the ABS_PRESSURE is ignored and only BTN_TOUCH is processed
to detect screen taps.
Only some special graphics applications read the pressure channel and
they will be mixed up by this non-monotonic relation.
So we fix it to become:
0 for no pressure (resistance infinite)
low value for soft pressure (high resistance)
high value for firm pressure (lower resistance)
While this patch changes the values reported to userspace,
ABS_PRESSURE is used rarely by userspace. Most software only
relies on BTN_TOUCH (boolean), which is not affected by this
patch. Some graphics software makes use of the interface and
does not work correctly with the currently used inverted
behaviour.
Signed-off-by: H. Nikolaus Schaller <redacted>
---
drivers/input/touchscreen/tsc2007_core.c | 2 ++
1 file changed, 2 insertions(+)
Applied, thank you.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html