diff mbox series

[09/10] dt-bindings: input: touchscreen: stmpe: add tracking index

Message ID 20190527161938.31871-5-leif.middelschulte@klsmartin.com (mailing list archive)
State New, archived
Headers show
Series input: touchscreen: stmpe: ext. features | expand

Commit Message

Middelschulte, Leif May 27, 2019, 4:19 p.m. UTC
The tracking index is a "minimum" distance two touch
points need to have in order for the second to be valid.
This adds the corresponding binding property documentation.

Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
---
 .../bindings/input/touchscreen/stmpe.txt          | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Rob Herring June 14, 2019, 7:58 p.m. UTC | #1
On Mon, May 27, 2019 at 06:19:37PM +0200, Leif Middelschulte wrote:
> The tracking index is a "minimum" distance two touch
> points need to have in order for the second to be valid.
> This adds the corresponding binding property documentation.
> 
> Signed-off-by: Leif Middelschulte <leif.middelschulte@klsmartin.com>
> ---
>  .../bindings/input/touchscreen/stmpe.txt          | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> index 09d2d4f288cc..8696af35a7b8 100644
> --- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> @@ -42,6 +42,21 @@ Optional properties:
>  				The given window also affects the value range (limits) set
>  				within the input subsystem which, in turn, affects
>  				the input resolution calculation on both axes.
> +- st,tracking-index	: Minimal distance between the current touch position and the previous
> +				touch position. If the distance is shorter than the tracking
> +				index, it is discarded. The tracking is calculated by summation
> +				of the horizontal and vertical movement.
> +				If pressure reporting is enabled (X/Y/Z), an increase in pressure
> +				override the movement tracking and report the new data set, even
> +				if X/Y is within the previous tracking index.
> +				0 -> disabled
> +				1 -> 4
> +				4 -> 8
> +				3 -> 16
> +				4 -> 32
> +				5 -> 64
> +				6 -> 92
> +				7 -> 127

This is what touchscreen-fuzz-x/y is for.

>  - touchscreen-inverted-x: X axis is inverted (boolean)
>  - touchscreen-inverted-y: Y axis is inverted (boolean)
>  - touchscreen-swapped-x-y: X and Y axis are swapped (boolean)
> -- 
> 2.21.0
>
Middelschulte, Leif June 19, 2019, 12:47 p.m. UTC | #2
Am Freitag, den 14.06.2019, 13:58 -0600 schrieb Rob Herring:
> On Mon, May 27, 2019 at 06:19:37PM +0200, Leif Middelschulte wrote:
> > The tracking index is a "minimum" distance two touch
> > points need to have in order for the second to be valid.
> > This adds the corresponding binding property documentation.
> > 
> > Signed-off-by: Leif Middelschulte <
> > leif.middelschulte@klsmartin.com
> > >
> > ---
> >  .../bindings/input/touchscreen/stmpe.txt          | 15 +++++++++++++++
> >  1 file changed, 15 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > index 09d2d4f288cc..8696af35a7b8 100644
> > --- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > @@ -42,6 +42,21 @@ Optional properties:
> >  				The given window also affects the value range (limits) set
> >  				within the input subsystem which, in turn, affects
> >  				the input resolution calculation on both axes.
> > +- st,tracking-index	: Minimal distance between the current touch position and the previous
> > +				touch position. If the distance is shorter than the tracking
> > +				index, it is discarded. The tracking is calculated by summation
> > +				of the horizontal and vertical movement.
> > +				If pressure reporting is enabled (X/Y/Z), an increase in pressure
> > +				override the movement tracking and report the new data set, even
> > +				if X/Y is within the previous tracking index.
> > +				0 -> disabled
> > +				1 -> 4
> > +				4 -> 8
> > +				3 -> 16
> > +				4 -> 32
> > +				5 -> 64
> > +				6 -> 92
> > +				7 -> 127
> 
> This is what touchscreen-fuzz-x/y is for.

The stmpe touchcontroller does not support handling each axis separately.
Also it is not to be mistaken in its specific behavior (i.e. override)
for the general `fuzz` parameter. However, should I rename it to `st,fuzz-x-y` or similar?

AFAICS there[0] is no generic combined devicetree property, is there?

[0]https://www.kernel.org/doc/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt

> 
> >  - touchscreen-inverted-x: X axis is inverted (boolean)
> >  - touchscreen-inverted-y: Y axis is inverted (boolean)
> >  - touchscreen-swapped-x-y: X and Y axis are swapped (boolean)
> > -- 
> > 2.21.0
> >
Rob Herring June 19, 2019, 1:46 p.m. UTC | #3
On Wed, Jun 19, 2019 at 6:47 AM Middelschulte, Leif
<Leif.Middelschulte@klsmartin.com> wrote:
>
> Am Freitag, den 14.06.2019, 13:58 -0600 schrieb Rob Herring:
> > On Mon, May 27, 2019 at 06:19:37PM +0200, Leif Middelschulte wrote:
> > > The tracking index is a "minimum" distance two touch
> > > points need to have in order for the second to be valid.
> > > This adds the corresponding binding property documentation.
> > >
> > > Signed-off-by: Leif Middelschulte <
> > > leif.middelschulte@klsmartin.com
> > > >
> > > ---
> > >  .../bindings/input/touchscreen/stmpe.txt          | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > index 09d2d4f288cc..8696af35a7b8 100644
> > > --- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > @@ -42,6 +42,21 @@ Optional properties:
> > >                             The given window also affects the value range (limits) set
> > >                             within the input subsystem which, in turn, affects
> > >                             the input resolution calculation on both axes.
> > > +- st,tracking-index        : Minimal distance between the current touch position and the previous
> > > +                           touch position. If the distance is shorter than the tracking
> > > +                           index, it is discarded. The tracking is calculated by summation
> > > +                           of the horizontal and vertical movement.
> > > +                           If pressure reporting is enabled (X/Y/Z), an increase in pressure
> > > +                           override the movement tracking and report the new data set, even
> > > +                           if X/Y is within the previous tracking index.
> > > +                           0 -> disabled
> > > +                           1 -> 4
> > > +                           4 -> 8
> > > +                           3 -> 16
> > > +                           4 -> 32
> > > +                           5 -> 64
> > > +                           6 -> 92
> > > +                           7 -> 127
> >
> > This is what touchscreen-fuzz-x/y is for.
>
> The stmpe touchcontroller does not support handling each axis separately.
> Also it is not to be mistaken in its specific behavior (i.e. override)
> for the general `fuzz` parameter. However, should I rename it to `st,fuzz-x-y` or similar?
>
> AFAICS there[0] is no generic combined devicetree property, is there?

Can't you set both properties and require them to be the same value?

Rob
Middelschulte, Leif June 24, 2019, 11:44 a.m. UTC | #4
Am Mittwoch, den 19.06.2019, 07:46 -0600 schrieb Rob Herring:
> On Wed, Jun 19, 2019 at 6:47 AM Middelschulte, Leif
> <
> Leif.Middelschulte@klsmartin.com
> > wrote:
> > Am Freitag, den 14.06.2019, 13:58 -0600 schrieb Rob Herring:
> > > On Mon, May 27, 2019 at 06:19:37PM +0200, Leif Middelschulte wrote:
> > > > The tracking index is a "minimum" distance two touch
> > > > points need to have in order for the second to be valid.
> > > > This adds the corresponding binding property documentation.
> > > > 
> > > > Signed-off-by: Leif Middelschulte <
> > > > leif.middelschulte@klsmartin.com
> > > > 
> > > > 
> > > > ---
> > > >  .../bindings/input/touchscreen/stmpe.txt          | 15 +++++++++++++++
> > > >  1 file changed, 15 insertions(+)
> > > > 
> > > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > > index 09d2d4f288cc..8696af35a7b8 100644
> > > > --- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > > +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > > @@ -42,6 +42,21 @@ Optional properties:
> > > >                             The given window also affects the value range (limits) set
> > > >                             within the input subsystem which, in turn, affects
> > > >                             the input resolution calculation on both axes.
> > > > +- st,tracking-index        : Minimal distance between the current touch position and the previous
> > > > +                           touch position. If the distance is shorter than the tracking
> > > > +                           index, it is discarded. The tracking is calculated by summation
> > > > +                           of the horizontal and vertical movement.
> > > > +                           If pressure reporting is enabled (X/Y/Z), an increase in pressure
> > > > +                           override the movement tracking and report the new data set, even
> > > > +                           if X/Y is within the previous tracking index.
> > > > +                           0 -> disabled
> > > > +                           1 -> 4
> > > > +                           4 -> 8
> > > > +                           3 -> 16
> > > > +                           4 -> 32
> > > > +                           5 -> 64
> > > > +                           6 -> 92
> > > > +                           7 -> 127
> > > 
> > > This is what touchscreen-fuzz-x/y is for.
> > 
> > The stmpe touchcontroller does not support handling each axis separately.
> > Also it is not to be mistaken in its specific behavior (i.e. override)
> > for the general `fuzz` parameter. However, should I rename it to `st,fuzz-x-y` or similar?
> > 
> > AFAICS there[0] is no generic combined devicetree property, is there?
> 
> Can't you set both properties and require them to be the same value?
The documentation would have to mention the (deviating) behavior possibly like follows:
``` This snippet is adapted from eeti.txt[0]
The following optional properties described in touchscreen.txt are
also supported:

- touchscreen-fuzz-x: This value needs to be the same as touchscreen-fuzz-y.
                      It is futhermore ignored, if the Z-axis is acquired too and an increase in pressure is detected.
      
The given value is a sum of the distances of both axis.
- touchscreen-fuzz-y: This value needs to be the same as touchscreen-fuzz-x.
                      It is futhermore ignored, if the Z-axis is acquired too and an increase in pressure is detected.
                      The given value is a sum of the distances of both axis.
```
Seems a bit odd to imagine. How would you suggest to it to look like?


It seems, to me, that either a general combined value should be introduced or this should be left stmpe specific (especially when considering the override behavior).

[0] https://www.kernel.org/doc/Documentation/devicetree/bindings/input/touchscreen/eeti.txt

Leif

> 
> Rob
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
index 09d2d4f288cc..8696af35a7b8 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
@@ -42,6 +42,21 @@  Optional properties:
 				The given window also affects the value range (limits) set
 				within the input subsystem which, in turn, affects
 				the input resolution calculation on both axes.
+- st,tracking-index	: Minimal distance between the current touch position and the previous
+				touch position. If the distance is shorter than the tracking
+				index, it is discarded. The tracking is calculated by summation
+				of the horizontal and vertical movement.
+				If pressure reporting is enabled (X/Y/Z), an increase in pressure
+				override the movement tracking and report the new data set, even
+				if X/Y is within the previous tracking index.
+				0 -> disabled
+				1 -> 4
+				4 -> 8
+				3 -> 16
+				4 -> 32
+				5 -> 64
+				6 -> 92
+				7 -> 127
 - touchscreen-inverted-x: X axis is inverted (boolean)
 - touchscreen-inverted-y: Y axis is inverted (boolean)
 - touchscreen-swapped-x-y: X and Y axis are swapped (boolean)