From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Rob Herring <robh@kernel.org>
Cc: "Mylène Josserand" <mylene.josserand@free-electrons.com>,
fery@cypress.com, mark.rutland@arm.com,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
devicetree@vger.kernel.org, thomas.petazzoni@free-electrons.com,
maxime.ripard@free-electrons.com
Subject: Re: [PATCH 2/2] Documentation: DT: bindings: input: Add documentation for cyttsp5
Date: Wed, 7 Jun 2017 13:40:32 -0700 [thread overview]
Message-ID: <20170607204032.GH13116@dtor-ws> (raw)
In-Reply-To: <20170607202603.f7qh46gjkjrxx3cp@rob-hp-laptop>
On Wed, Jun 07, 2017 at 03:26:03PM -0500, Rob Herring wrote:
> On Mon, May 29, 2017 at 04:45:38PM +0200, Mylène Josserand wrote:
> > Add the Cypress TrueTouch Generation 5 touchscreen device tree bindings
> > documentation. It can use I2C or SPI bus.
> > This touchscreen can handle some defined zone that are designed and
> > sent as button. To be able to customize the keycode sent, the
> > "linux,code" property in a "button" sub-node can be used.
>
> "documentation" twice in the subject makes for a long subject.
> The preferred subject prefix is "dt-bindings: input: ..."
>
> >
> > Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
> > ---
> > .../bindings/input/touchscreen/cyttsp5.txt | 55 ++++++++++++++++++++++
>
> cypress,cyttsp5.txt matching the compatible is preferred.
>
> > 1 file changed, 55 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt
> >
> > diff --git a/Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt b/Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt
> > new file mode 100644
> > index 000000000000..713a377b5039
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/input/touchscreen/cyttsp5.txt
> > @@ -0,0 +1,55 @@
> > +* Cypress cyttsp touchscreen controller, generation 5
> > +
> > +Required properties:
> > + - compatible : must be "cypress,cyttsp5"
> > + - reg : Device I2C address or SPI chip select number
> > + - interrupt-parent : the phandle for the gpio controller
> > + (see interrupt binding[0]).
> > + - interrupts : (gpio) interrupt to which the chip is connected
> > + (see interrupt binding[0]).
> > +
> > +Optional properties (many of them coming from touchscreen binding[1]):
> > + - reset-gpios : the reset gpio the chip is connected to
> > + (see GPIO binding[2] for more details).
> > + - touchscreen-size-x : horizontal resolution of touchscreen (in pixels)
>
> Just "see ./touchscreen.txt" is enough description.
>
> > + - touchscreen-size-y : vertical resolution of touchscreen (in pixels)
> > + - 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)
> > +
> > +This touchscreen can handle some buttons that are touchscreen's defined zones.
> > +Each button's event can be customized using a sub-node properties:
> > + - linux,code: Keycode to emit.
> > +
> > +[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> > +[1]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
> > +[2]: Documentation/devicetree/bindings/gpio/gpio.txt
> > +
> > +Example:
> > +&i2c0 {
> > + [...]
> > +
> > + tsc@24 {
>
> touchscreen@24
>
> > + compatible = "cypress,cyttsp5";
> > + reg = <0x24>;
> > +
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&tp_reset_ds203>;
> > + interrupt-parent = <&pio>;
> > + interrupts = <1 5 IRQ_TYPE_LEVEL_LOW>;
> > + reset-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>;
> > +
> > + button@0 {
>
> unit addresses need a reg property. If 0,1,2 are meaningful numbers for
> the hardware, then it makes sense to add here.
Another option would be just say:
linux,keycodes = <KEY_HOMEPAGE>, <KEY_MENU>, <KEY_BACK>;
I am wondering though: you read number of button supported by the device
from HID_SYSINFO_BTN_OFFSET, can you also get button assignment form
the device as well?
And the biggest question of all: since you refer to HID descriptors in
your driver, is it a HID device and should it be driven by HID susbystem
instead of relying on a custom driver?
>
> > + linux,code = <KEY_HOMEPAGE>;
> > + };
> > +
> > + button@1 {
> > + linux,code = <KEY_MENU>;
> > + };
> > +
> > + button@2 {
> > + linux,code = <KEY_BACK>;
> > + };
> > + };
> > +};
> > --
> > 2.11.0
> >
Thanks.
--
Dmitry
next prev parent reply other threads:[~2017-06-07 20:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 14:45 [PATCH 0/2] Input: Add Cypress Gen5 Touchscreen driver Mylène Josserand
2017-05-29 14:45 ` [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen Mylène Josserand
2017-05-29 17:16 ` kbuild test robot
2017-05-29 17:16 ` [PATCH] Input: fix platform_no_drv_owner.cocci warnings kbuild test robot
2017-05-30 8:02 ` [PATCH 1/2] Input: Add driver for Cypress Generation 5 touchscreen Maxime Ripard
2017-06-06 8:03 ` Mylene Josserand
2017-06-06 12:04 ` Maxime Ripard
2017-06-06 14:32 ` Mylene Josserand
[not found] ` <0232a641-c741-1f95-9086-840b31f5d055-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-06-07 9:16 ` Maxime Ripard
2017-05-30 8:11 ` Thomas Petazzoni
[not found] ` <20170529144538.29187-2-mylene.josserand-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-30 8:43 ` Thomas Petazzoni
[not found] ` <20170530104302.6db658f0-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-06-06 13:20 ` Mylene Josserand
2017-05-29 14:45 ` [PATCH 2/2] Documentation: DT: bindings: input: Add documentation for cyttsp5 Mylène Josserand
2017-06-07 20:26 ` Rob Herring
2017-06-07 20:40 ` Dmitry Torokhov [this message]
2017-06-09 11:32 ` Mylene Josserand
2017-06-09 11:11 ` Mylene Josserand
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=20170607204032.GH13116@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=fery@cypress.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=mylene.josserand@free-electrons.com \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/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).