devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Sebastian Reichel <sre@kernel.org>,
	Sebastian Reichel <sre@ring0.de>,
	linux-input@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 1/5] Input: add common DT binding for touchscreens
Date: Mon, 5 May 2014 13:12:02 -0700	[thread overview]
Message-ID: <20140505201202.GH25949@atomide.com> (raw)
In-Reply-To: <20140505195139.GA26978@core.coreip.homeip.net>

* Dmitry Torokhov <dmitry.torokhov@gmail.com> [140505 12:52]:
> On Mon, May 05, 2014 at 12:41:26PM -0700, Tony Lindgren wrote:
> > * Sebastian Reichel <sre@kernel.org> [140425 16:56]:
> > > Add common DT binding documentation for touchscreen devices and
> > > implement input_parse_touchscreen_of_params, which parses the common
> > > properties and configures the input device accordingly.
> > > 
> > > The method currently does not interpret the axis inversion properties,
> > > since there is no matching flag in the generic linux input device.
> > > 
> > > Signed-off-by: Sebastian Reichel <sre@kernel.org>
> > > ---
> > >  .../bindings/input/touchscreen/touchscreen.txt     | 27 +++++++++++++++++
> > >  drivers/input/input.c                              | 34 ++++++++++++++++++++++
> > >  include/linux/input.h                              |  8 +++++
> > >  3 files changed, 69 insertions(+)
> > >  create mode 100644 Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
> > > new file mode 100644
> > > index 0000000..d8e0616
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
> > > @@ -0,0 +1,27 @@
> > > +General Touchscreen Properties:
> > > +
> > > +Optional properties for Touchscreens:
> > > + - touchscreen-size-x		: horizontal resolution of touchscreen
> > > +				  (in pixels)
> > > + - touchscreen-size-y		: vertical resolution of touchscreen
> > > +				  (in pixels)
> > > + - touchscreen-max-pressure	: maximum reported pressure (arbitrary range
> > > +				  dependent on the controller)
> > > + - touchscreen-fuzz-x		: horizontal noise value of the absolute input
> > > +				  device (in pixels)
> > > + - touchscreen-fuzz-y		: vertical noise value of the absolute input
> > > +				  device (in pixels)
> > > + - touchscreen-fuzz-pressure	: pressure noise value of the absolute input
> > > +				  device (arbitrary range dependent on the
> > > +				  controller)
> 
> Fuzz seems like linux-specific property, not generic one.
> 
> 
> > > + - touchscreen-inverted-x	: X axis is inverted (boolean)
> > > + - touchscreen-inverted-y	: Y axis is inverted (boolean)
> > 
> > We probably also need something to swap x and y depending on the
> > display orientation in addition to the touchscreen-inverted-x and y.
> > Just swapping x and y is not enough depending if we rotate by 270
> > degrees instead of 90 degrees.
> > 
> > Naturally that part can be added later.
> 
> So far we've been relying on upper layers (such as tslib) to perform
> such transformations rather than re-implementing it in every driver. Are
> we saying that we need to implement this in input core?

We seem to have that already partially implemented at least with
ti,swap-xy in Documentation/devicetree/bindings/input/ads7846.txt.

But that only works for the 90 degree rotation case as it's missing
something similar to touchscreen-inverted-x I just noticed few days
ago while trying to make some legacy code disappear :)

No idea where rotation should be specified. But if the panel is
rotated based on the DT property or kernel cmdline, probably the
touchscreen should be too? In most cases touchscreens are integrated
together with the LCD panel, and they are not separate like other
input devices.

Regards,

Tony

  reply	other threads:[~2014-05-05 20:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25 23:56 [PATCHv3 0/5] tsc2005 DT binding Sebastian Reichel
2014-04-25 23:56 ` [PATCHv3 1/5] Input: add common DT binding for touchscreens Sebastian Reichel
2014-04-29  9:23   ` Pavel Machek
2014-05-05 19:41   ` Tony Lindgren
2014-05-05 19:51     ` Dmitry Torokhov
2014-05-05 20:12       ` Tony Lindgren [this message]
2014-05-05 23:04       ` Sebastian Reichel
2014-05-19  5:35         ` Dmitry Torokhov
2014-04-25 23:56 ` [PATCHv3 2/5] Input: tsc2005: use dev_err for error messages Sebastian Reichel
2014-04-29  9:23   ` Pavel Machek
2014-05-19  5:33   ` Dmitry Torokhov
2014-04-25 23:56 ` [PATCHv3 3/5] Input: tsc2005: convert driver to use devm_* Sebastian Reichel
2014-04-29  9:23   ` Pavel Machek
2014-05-19  5:33   ` Dmitry Torokhov
2014-04-25 23:56 ` [PATCHv3 4/5] Input: tsc2005: add DT support Sebastian Reichel
2014-04-29  9:24   ` Pavel Machek
2014-04-25 23:56 ` [PATCHv3 5/5] Documentation: dt: Document TSC2005 DT binding Sebastian Reichel
2014-04-29  9:23   ` Pavel Machek
2014-05-15 14:23 ` [PATCHv3 0/5] tsc2005 " Sebastian Reichel
2014-05-15 19:16   ` Aaro Koskinen

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=20140505201202.GH25949@atomide.com \
    --to=tony@atomide.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=sre@ring0.de \
    /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).