[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZmMfd5KvNaao-miE@debian-BULLSEYE-live-builder-AMD64>
Date: Fri, 7 Jun 2024 11:55:51 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: Mark Brown <broonie@...nel.org>
Cc: Marcelo Schmitt <marcelo.schmitt@...log.com>, lars@...afoo.de,
Michael.Hennerich@...log.com, jic23@...nel.org, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
nuno.sa@...log.com, dlechner@...libre.com,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-spi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/6] spi: Add SPI mode bit for MOSI idle state
configuration
On 06/07, Mark Brown wrote:
> 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.
Ack
>
> > 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.
Ok. Yes, when connected in that datasheet "3-wire" mode the MOSI idle high
feature is pretty much required otherwise users won't be able to sample the ADC.
Will document the behavior for the MOSI idle feature and make spi_setup() fail
with better message if the controller can't support a device requesting it.
Thanks,
Marcelo
Powered by blists - more mailing lists