On Thu, Sep 26, 2024 at 08:07:49AM +0200, Ahmad Fatoum wrote:
> On 25.09.24 16:06, Sascha Hauer wrote:
> > The spi-gpio driver only supports 8bit word width. Add support for
> > arbitrary word widths up to 32bit.
> > 
> > Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
> 
> With below issue addressed:
> 
> Reviewed-by: Ahmad Fatoum <a.fat...@pengutronix.de>
> 
> >  static int gpio_spi_setup(struct spi_device *spi)
> >  {
> > -   if (spi->bits_per_word != 8) {
> > -           dev_err(spi->master->dev, "master does not support %d bits per 
> > word\n",
> > -                   spi->bits_per_word);
> > -           return -EINVAL;
> > -   }
> > -
> > +   gpio_spi_set_cs(spi, 0);
> 
> Chipselect is already asserted/deasserted in gpio_spi_transfer, why deassert 
> it here?

I had a case where the CS is asserted by default during startup. I had
to deassert it once before the very first transfer to signal a new
transfer to the slave.

Anyway, this change deserves an extra patch.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to