lkml.org 
[lkml]   [2012]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 8/8] i2c: Add device tree support to i2c-pnx.c
    On Wed, Apr 04, 2012 at 10:34:40AM +0200, Roland Stigge wrote:
    > This patch adds device tree support to the pnx-i2c driver by using platform
    > resources for memory region and irq and removing dependency on mach includes.
    >
    > The following platforms are affected:
    >
    > * PNX
    > * LPC31xx (WIP)
    > * LPC32xx
    >
    > The patch is based on a patch by Jon Smirl, working on lpc31xx integration
    >
    > Signed-off-by: Roland Stigge <stigge@antcom.de>
    > Reviewed-by: Arnd Bergmann <arnd@arndb.de>

    I added devicetree-discuss to the (quite long) CC list. I am not sure
    about all of the bindings.

    >
    > ---
    >
    > Applies to v3.4-rc1
    >
    > Documentation/devicetree/bindings/i2c/pnx.txt | 40 ++++++++++++++++
    > drivers/i2c/busses/i2c-pnx.c | 65 +++++++++++++++++++-------
    > include/linux/i2c-pnx.h | 1
    > 3 files changed, 89 insertions(+), 17 deletions(-)
    >
    > --- /dev/null
    > +++ linux-2.6/Documentation/devicetree/bindings/i2c/pnx.txt
    > @@ -0,0 +1,40 @@
    > +* NXP PNX I2C Controller
    > +
    > +Required properties:
    > +
    > + - reg: Offset and length of the register set for the device
    > + - compatible: should be "nxp,pnx-i2c"
    > + - interrupts: configure one interrupt line
    > + - #address-cells: always 1 (for i2c addresses)
    > + - #size-cells: always 0
    > +
    > +Optional properties:
    > +
    > + - interrupt-parent: the phandle for the interrupt controller that
    > + services interrupts for this device.

    That one is not optional, or? You always need it but in most cases it
    gets inherited as I understand.

    > + - clock-frequency: desired I2C bus clock frequency in Hz, Default: 100000 Hz
    > + - pnx,timeout: I2C bus timeout in milliseconds, Default: 10 ms

    To devicetree-folks: Can we argue this is a hardware property of the
    bus? Then we could introduce a generic "timeout" property? I see, there
    is already "fsl,timeout", and it won't make sense to have that per
    vendor?

    > + - slave-addr: Address used by the controller, Hardware default: 110

    I'd prefer the hex value here, I2C addresses are mostly specified in
    hex.

    Regards,

    Wolfram

    --
    Pengutronix e.K. | Wolfram Sang |
    Industrial Linux Solutions | http://www.pengutronix.de/ |
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2012-04-18 22:37    [W:0.032 / U:95.880 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site