Re: [PATCH v3 1/6] spi: Add SPI mode bit for MOSI idle state configuration

Mark Brown
2024-06-07T13:50:08Z

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

On Thu, Jun 06, 2024 at 04:57:52PM -0300, Marcelo Schmitt wrote:

> As far as I searched, the definitions for SPI protocol usually don't specify any
> behavior for the MOSI line when the controller is not clocking out data.
> So, I think SPI controllers that are not capable of implementing any type
> of MOSI idle configuration are anyway compliant to what is usual SPI.
> For those that can implement such feature, I thought peripherals could request
> it by setting SPI mode bits.

The issue here is the one that Richard highlighted with it not being
clear exactly what the intended behaviour is.

> But yeah, it's not that evident what this patch set is all about and why this is
> wanted so I made a wiki page to explain the reasoning for this set.
> https://wiki.analog.com/software/linux/docs/spi/spi_copi_idle?rev=1717699755
> Hopefully the figures with timing diagrams and transfer captures there will
> provide quicker understanding of this rather than I try to explain it with
> only text.

It needs to be apparent to someone looking at the kernel what the code
is intended to do.

> If you still think we need feature detection for MOSI idle capability just let
> me know, I'll implement what be needed.

If the devices actually require this mode then we can't just randomly
ignore them when they request it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]