Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584737 > unrolled thread
| Started by | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| First post | 2017-02-20 18:00 +0100 |
| Last post | 2017-02-23 09:50 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 2/3] Input: tsc2007 - correctly report pressure and not resistance to user space "H. Nikolaus Schaller" <hns@goldelico.com> - 2017-02-20 18:00 +0100
Re: [PATCH 2/3] Input: tsc2007 - correctly report pressure and not resistance to user space Sebastian Reichel <sre@kernel.org> - 2017-02-21 18:20 +0100
Re: [PATCH 2/3] Input: tsc2007 - correctly report pressure and not resistance to user space Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-23 09:50 +0100
| From | "H. Nikolaus Schaller" <hns@goldelico.com> |
|---|---|
| Date | 2017-02-20 18:00 +0100 |
| Subject | [PATCH 2/3] Input: tsc2007 - correctly report pressure and not resistance to user space |
| Message-ID | <tcZtE-7aS-15@gated-at.bofh.it> |
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 <hns@goldelico.com> --- drivers/input/touchscreen/tsc2007_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c index 30b53ca..fc73849 100644 --- a/drivers/input/touchscreen/tsc2007_core.c +++ b/drivers/input/touchscreen/tsc2007_core.c @@ -141,6 +141,8 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle) "DOWN point(%4d,%4d), resistance (%4u)\n", tc.x, tc.y, rt); + rt = ts->max_rt - rt; + input_report_key(input, BTN_TOUCH, 1); input_report_abs(input, ABS_X, tc.x); input_report_abs(input, ABS_Y, tc.y); -- 2.7.3
[toc] | [next] | [standalone]
| From | Sebastian Reichel <sre@kernel.org> |
|---|---|
| Date | 2017-02-21 18:20 +0100 |
| Subject | Re: [PATCH 2/3] Input: tsc2007 - correctly report pressure and not resistance to user space |
| Message-ID | <tdmgy-5z4-23@gated-at.bofh.it> |
| In reply to | #1584737 |
[Multipart message — attachments visible in raw view] — view raw
Hi, On Mon, Feb 20, 2017 at 05:56:35PM +0100, H. Nikolaus Schaller wrote: > 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 <hns@goldelico.com> > --- > drivers/input/touchscreen/tsc2007_core.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c > index 30b53ca..fc73849 100644 > --- a/drivers/input/touchscreen/tsc2007_core.c > +++ b/drivers/input/touchscreen/tsc2007_core.c > @@ -141,6 +141,8 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle) > "DOWN point(%4d,%4d), resistance (%4u)\n", > tc.x, tc.y, rt); > > + rt = ts->max_rt - rt; > + > input_report_key(input, BTN_TOUCH, 1); > input_report_abs(input, ABS_X, tc.x); > input_report_abs(input, ABS_Y, tc.y); Reviewed-By: Sebastian Reichel <sre@kernel.org> We should add the same to ts200x-core. -- Sebastian
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-02-23 09:50 +0100 |
| Subject | Re: [PATCH 2/3] Input: tsc2007 - correctly report pressure and not resistance to user space |
| Message-ID | <tdXg6-7i8-21@gated-at.bofh.it> |
| In reply to | #1585544 |
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: > > 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 <hns@goldelico.com> > > --- > > drivers/input/touchscreen/tsc2007_core.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/input/touchscreen/tsc2007_core.c b/drivers/input/touchscreen/tsc2007_core.c > > index 30b53ca..fc73849 100644 > > --- a/drivers/input/touchscreen/tsc2007_core.c > > +++ b/drivers/input/touchscreen/tsc2007_core.c > > @@ -141,6 +141,8 @@ static irqreturn_t tsc2007_soft_irq(int irq, void *handle) > > "DOWN point(%4d,%4d), resistance (%4u)\n", > > tc.x, tc.y, rt); > > > > + rt = ts->max_rt - rt; > > + > > input_report_key(input, BTN_TOUCH, 1); > > input_report_abs(input, ABS_X, tc.x); > > input_report_abs(input, ABS_Y, tc.y); > > Reviewed-By: Sebastian Reichel <sre@kernel.org> Applied, thank you. -- Dmitry
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web