Re: [PATCH v3 1/2] spi: support inter-word delay requirement for devices

From: Mark Brown
Date: Tue Jan 29 2019 - 11:42:00 EST


On Tue, Jan 29, 2019 at 11:07:50AM +0100, Geert Uytterhoeven wrote:
> On Tue, Jan 29, 2019 at 10:50 AM Jonas Bonn <jonas@xxxxxxxxxxx> wrote:

> > OK. So the user (perhaps in userspace using spidev) has to know the
> > rate of the IO clock that the SPI controller sits behind and then has to
> > match this to the required delay of the slave device... Doesn't sound
> > very portable.

I think if we're doing translation we should just do it in the core and
either say that clients should only set one or the other or pick what
looks like the higher value.

> I can see the value of having both:
> On some slaves, the delay may depend on a fixed internal or
> external clock[1] on the SPI slave, so it should be specified in time units.
> Some slaves may be clocked by the SPI clock[2], so the delay should be
> specified in SPI clock cycles.

Yes, they're definitely both useful.

Attachment: signature.asc
Description: PGP signature