Re: [PATCHv4 2/5] Input: edt-ft5x06: Add DT support

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

 




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@xxxxxxxxxxxxxxxxxxx>
> > ---
> >  .../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"


> > + - 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

> > + - 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.

> > +#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.


Lothar Waßmann
-- 
___________________________________________________________

Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996

www.karo-electronics.de | info@xxxxxxxxxxxxxxxxxxx
___________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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