Re: [PATCH 01/10] dt-bindings: input: touchscreen: stmpe: add touch window configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, den 14.06.2019, 13:48 -0600 schrieb Rob Herring:
> On Mon, May 27, 2019 at 06:07:27PM +0200, Leif Middelschulte wrote:
> > The STMPE811 is able to only monitor a subwindow of the
> > entire screen. Touches outside of this window are neglected.
> > This change adds the corresponding documentation.
> 
> Unless you are trying to just filter out the edge values 
I'm trying to "just filter out the edge values" by filtering the values
right on the smpte microcontroller. It is a device specific feature, that is
why I implemented and documented the support.

But sure, one could leave that to a corresponding entry in the hwdb that
would manipulate absinfo to gain calibrated input [1].

> which I think we already have properties for,
While there [0] is "touchscreen-min-{x,y}", I could not spot a corresponding
"touchscreen-max-{x,y}". Could you point me to the right property?

> wouldn't this be something the user may want to adjust/move at runtime?
It is adjustable at runtime via the hwdb or calling ioctl on the evdev device directly.


[0] https://www.kernel.org/doc/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
[1] https://who-t.blogspot.com/2018/08/how-60-evdevhwdb-works.html
> 
> > Signed-off-by: Leif Middelschulte <
> > leif.middelschulte@xxxxxxxxxxxxx
> > >
> > ---
> >  .../devicetree/bindings/input/touchscreen/stmpe.txt      | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > index c549924603d2..04962e2e1ad0 100644
> > --- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > @@ -33,6 +33,13 @@ Optional properties:
> >  - st,i-drive		: current limit value of the touchscreen drivers
> >  				0 -> 20 mA (typical 35mA max)
> >  				1 -> 50 mA (typical 80 mA max)
> > +- st,window-tracking	: An u12 array that allows to pre-set a sub-window in the touchscreen.
> 
> u16?
> 
> > +				Any touch position that is outside the sub-window is discarded
> > +				(top-right x, top-right y, bottom-left x, bottom-left y).
> > +				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.
> > +
> >  
> >  Optional properties common with MFD (deprecated):
> >   - st,sample-time	: ADC conversion time in number of clock.
> > @@ -101,6 +108,8 @@ stmpe811@41 {
> >  		 * current limit value
> >  		 */
> >  		st,i-drive = <1>;
> > +		/* enable entire window */
> > +		st,window-tracking = /bits/ 16 <4095 4095 0 0>;
> >  	};
> >  	stmpe_adc {
> >  		compatible = "st,stmpe-adc";
> > -- 
> > 2.21.0
> > 




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux