From: Mark Rutland <mark.rutland@arm.com>
To: "Lothar Waßmann" <LW@KARO-electronics.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Fugang Duan <B38611@freescale.com>,
"grant.likely@linaro.org" <grant.likely@linaro.org>,
Henrik Rydberg <rydberg@euromail.se>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Jingoo Han <jg1.han@samsung.com>,
Kumar Gala <galak@codeaurora.org>,
Pawel Moll <Pawel.Moll@arm.com>, Rob Herring <robh+dt@kernel.org>,
Rob Landley <rob@landley.net>,
Sachin Kamat <sachin.kamat@linaro.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Simon Budig <simon.budig@kernelconcepts.de>
Subject: Re: [PATCHv4 2/5] Input: edt-ft5x06: Add DT support
Date: Thu, 20 Mar 2014 13:21:56 +0000 [thread overview]
Message-ID: <20140320132156.GD22115@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <20140320124055.53d469e7@ipc1.ka-ro>
On Thu, Mar 20, 2014 at 11:40:55AM +0000, Lothar Waßmann wrote:
> Hi,
>
> Mark Rutland wrote:
> > On Wed, Mar 19, 2014 at 01:09:20PM +0000, Lothar Waßmann wrote:
> > >
> > > Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
> > > ---
> > > .../bindings/input/touchscreen/edt-ft5x06.txt | 41 ++++++
> > > drivers/input/touchscreen/edt-ft5x06.c | 144 +++++++++++++++-----
> > > 2 files changed, 154 insertions(+), 31 deletions(-)
> > > create mode 100644 Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
> > > new file mode 100644
> > > index 0000000..e5adc76
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt
> > > @@ -0,0 +1,41 @@
> > > +FocalTech EDT-FT5x06 Polytouch driver
> > > +=====================================
> > > +
> > > +Required properties:
> > > + - compatible: "edt,edt-ft5x06"
> >
> > Is the 'x' part of a particular product name, or is this a class of
> > devices?
> >
> The FT5x06 datasheet lists 3 variants for different panel sizes.
> I'll add distinct compatible strings for those chips, though their SW
> interface is (currently) identical:
> |Required properties:
> | - compatible: "edt,edt-ft5206", "edt,edt-ft5x06"
> | or: "edt,edt-ft5306", "edt,edt-ft5x06"
> | or: "edt,edt-ft5406", "edt,edt-ft5x06"
Drop the "edt,edt-ft5x06" string. If they really appear to be identical
from a programmer's perspective, choose a particular variant to be used
as the fallback.
There could be a future variant that would appear to match the x string
yet was completely incompatible with the expected programming interface.
> > > + - reg: I2C slave address of the chip (0x38)
> > > + - interrupt-parent: a phandle pointing to the interrupt controller
> > > + serving the interrupt for this chip
> > > + - interrupts: interrupt specification for this chip
> >
> > How many? What are they for?
> >
> I'll change it to:
> | - interrupts: interrupt specification for the touchdetect
> | interrupt
That sounds fine to me.
> > > + - report_rate: allows setting the report rate in the range from 3 to
> > > + 14.
> >
> > However, why can the kernel not decide the report rate? This doesn't
> > sound like something that needs to vary per-board.
> >
> > Also, s/_/-/ in property names, please.
> >
> OK, I'll drop the property, which also simplyfies the code a bit.
Sounds good to me.
>
> > > +#define EDT_GET_PROP(name, reg) { \
> > > + const u32 *prop = of_get_property(np, #name, NULL); \
> > > + if (prop) \
> > > + edt_ft5x06_register_write(tsdata, reg, be32_to_cpu(*prop)); \
> > > +}
> >
> > Use of_property_read_u32, it'll handle endianness conversion for you.
> >
> > Use of of_get_property is almost always wrong.
> >
> Sure.
Cheers,
Mark.
next prev parent reply other threads:[~2014-03-20 13:21 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-19 13:09 Input: edt-ft5x06: Add DT support Lothar Waßmann
2014-03-19 13:09 ` [PATCHv4 1/5] Input: edt-ft5x06: several cleanups; no functional change Lothar Waßmann
[not found] ` <1395234563-11034-2-git-send-email-LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
2014-03-20 2:42 ` fugang.duan-KZfg59tc24xl57MIdRCFDg
2014-03-19 13:09 ` [PATCHv4 2/5] Input: edt-ft5x06: Add DT support Lothar Waßmann
2014-03-20 5:19 ` fugang.duan
2014-03-20 11:44 ` Lothar Waßmann
2014-03-20 9:37 ` Mark Rutland
[not found] ` <20140320093719.GB14420-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2014-03-20 11:18 ` Simon Budig
2014-03-20 13:19 ` Mark Rutland
2014-03-20 11:40 ` Lothar Waßmann
2014-03-20 11:48 ` Simon Budig
2014-03-20 12:05 ` Lothar Waßmann
2014-03-20 13:21 ` Mark Rutland [this message]
2014-03-19 13:09 ` [PATCHv4 3/5] Input: edt-ft5x06: Adjust delays to conform datasheet Lothar Waßmann
2014-03-19 13:09 ` [PATCHv4 4/5] Input: edt-ft5x06: Ignore touchdown events Lothar Waßmann
2014-03-20 5:22 ` fugang.duan
2014-03-19 13:09 ` [PATCHv4 5/5] Input: edt-ft5x06: Add support for M09 firmware version Lothar Waßmann
2014-03-20 13:44 ` [PATCHv5 0/5] Input: edt-ft5x06: Add DT support Lothar Waßmann
2014-03-20 13:44 ` [PATCHv5 1/5] Input: edt-ft5x06: several cleanups; no functional change Lothar Waßmann
[not found] ` <1395323075-12146-1-git-send-email-LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
2014-03-20 13:44 ` [PATCHv5 2/5] Input: edt-ft5x06: Add DT support Lothar Waßmann
2014-03-20 13:44 ` [PATCHv5 3/5] Input: edt-ft5x06: Adjust delays to conform datasheet Lothar Waßmann
2014-03-20 13:44 ` [PATCHv5 4/5] Input: edt-ft5x06: Ignore touchdown events Lothar Waßmann
2014-03-20 13:44 ` [PATCHv5 5/5] Input: edt-ft5x06: Add support for M09 firmware version Lothar Waßmann
2014-03-20 14:15 ` Daniel Wagener
2014-03-24 15:11 ` [PATCHv6 0/5] Input: edt-ft5x06: Add DT support Lothar Waßmann
2014-03-24 15:11 ` [PATCHv6 1/5] Input: edt-ft5x06: several cleanups; no functional change Lothar Waßmann
2014-03-24 15:11 ` [PATCHv6 2/5] Input: edt-ft5x06: Add DT support Lothar Waßmann
2014-03-28 16:26 ` Dmitry Torokhov
[not found] ` <1395673870-29435-1-git-send-email-LW-bxm8fMRDkQLDiMYJYoSAnRvVK+yQ3ZXh@public.gmane.org>
2014-03-24 15:11 ` [PATCHv6 3/5] Input: edt-ft5x06: Adjust delays to conform datasheet Lothar Waßmann
2014-03-24 15:11 ` [PATCHv6 4/5] Input: edt-ft5x06: Ignore touchdown events Lothar Waßmann
2014-03-24 15:11 ` [PATCHv6 5/5] Input: edt-ft5x06: Add support for M09 firmware version Lothar Waßmann
2014-03-28 16:31 ` [PATCHv6 0/5] Input: edt-ft5x06: Add DT support Dmitry Torokhov
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=20140320132156.GD22115@e106331-lin.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=B38611@freescale.com \
--cc=LW@KARO-electronics.de \
--cc=Pawel.Moll@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jg1.han@samsung.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
--cc=rydberg@euromail.se \
--cc=sachin.kamat@linaro.org \
--cc=simon.budig@kernelconcepts.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).