lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoLnn9K2caWJtIlQ@debian-BULLSEYE-live-builder-AMD64>
Date: Mon, 1 Jul 2024 14:30:07 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Marcelo Schmitt <marcelo.schmitt@...log.com>, broonie@...nel.org,
	lars@...afoo.de, Michael.Hennerich@...log.com, robh+dt@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	nuno.sa@...log.com, dlechner@...libre.com, corbet@....net,
	linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-spi@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 1/7] spi: Enable controllers to extend the SPI
 protocol with MOSI idle configuration

On 06/30, Jonathan Cameron wrote:
> On Sat, 29 Jun 2024 16:04:40 -0300
> Marcelo Schmitt <marcelo.schmitt@...log.com> wrote:
> 
> > The behavior of an SPI controller data output line (SDO or MOSI or COPI
> > (Controller Output Peripheral Input) for disambiguation) is usually not
> > specified when the controller is not clocking out data on SCLK edges.
> > However, there do exist SPI peripherals that require specific MOSI line
> > state when data is not being clocked out of the controller.
> > 
> > Conventional SPI controllers may set the MOSI line on SCLK edges then bring
> > it low when no data is going out or leave the line the state of the last
> > transfer bit. More elaborated controllers are capable to set the MOSI idle
> > state according to different configurable levels and thus are more suitable
> > for interfacing with demanding peripherals.
> > 
> > Add SPI mode bits to allow peripherals to request explicit MOSI idle state
> > when needed.
> > 
> > When supporting a particular MOSI idle configuration, the data output line
> > state is expected to remain at the configured level when the controller is
> > not clocking out data. When a device that needs a specific MOSI idle state
> > is identified, its driver should request the MOSI idle configuration by
> > setting the proper SPI mode bit.
> > 
> > Acked-by: Nuno Sa <nuno.sa@...log.com>
> > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@...log.com>
> 
> I always like to see some nice ascii art. Very nice documentation.
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
> 
> > diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> > index 93f59ebb5b79..c8ba5e490850 100644
> > --- a/drivers/spi/spi.c
> > +++ b/drivers/spi/spi.c
> 
> > @@ -3950,6 +3956,7 @@ int spi_setup(struct spi_device *spi)
> >  	 */
> >  	bad_bits = spi->mode & ~(spi->controller->mode_bits | SPI_CS_WORD |
> >  				 SPI_NO_TX | SPI_NO_RX);
> > +
> 
> Trivial grumpy comment.  Don't touch white space in unrelated code!

Ouf, must have slipped through after messing around with spi_setup().
Didn't intend to add that. Fine if that can be removed when applying the patch.

> 
> >  	ugly_bits = bad_bits &
> >  		    (SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL |
> >  		     SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ