Re: [PATCH 1/2] i2c-designware: make *CNT values configurable

From: Christian Ruppert
Date: Mon Aug 12 2013 - 03:48:27 EST


On Mon, Aug 05, 2013 at 12:02:26PM +0200, Wolfram Sang wrote:
>
> > > >Would it make sense to add generic I2C device tree properties for those
> > > >parameters? These parameters are independent of the actual bus driver,
> > > >rather a PCB property... And as such the correct place would be device
> > > >tree or ACPI or similar.
> > >
> > > If there are other bus drivers that make use of tr/tf transition
> > > times, I think it makes sense.
> >
> > Wolfram, what's your opinion on this?
>
> If it is a PCB property, it makes sense to have generic bindings for
> it. Can they have very-safe defaults and thus be optional?

We can definitely have safe defaults that work for a given
driver/hardware. I don't think the same defaults would be safe for all
drivers/hardware: The timing strategies of different I2C hardware seems
to vary widely (which edges of the clock are sampled, how does different
hardware deal with hold times etc) and depending on which parameters are
available to the driver to control these timings, the safe values would
either have to be the minimum or the maximum in the range allowed by the
I2C specification.
Every driver would thus have to implement its own defaults in case the
properties are not defined.

Christian

Attachment: pgp00000.pgp
Description: PGP signature