From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: "open list:BAREBOX" <barebox@lists.infradead.org>
Subject: Re: [PATCH 2/3] spi: spi-gpio: support different word widths
Date: Thu, 26 Sep 2024 09:16:02 +0200 [thread overview]
Message-ID: <ZvUKMrQckfAELL8M@pengutronix.de> (raw)
In-Reply-To: <008a1d90-2bb7-4135-9546-ba7b21bc56dc@pengutronix.de>
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.hauer@pengutronix.de>
>
> With below issue addressed:
>
> Reviewed-by: Ahmad Fatoum <a.fatoum@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 |
next prev parent reply other threads:[~2024-09-26 7:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 14:06 [PATCH 0/3] spi-gpio updates Sascha Hauer
2024-09-25 14:06 ` [PATCH 1/3] spi: spi-gpio: actually delay in spidelay() Sascha Hauer
2024-09-26 5:55 ` Ahmad Fatoum
2024-09-26 7:05 ` Sascha Hauer
2024-09-25 14:06 ` [PATCH 2/3] spi: spi-gpio: support different word widths Sascha Hauer
2024-09-26 6:07 ` Ahmad Fatoum
2024-09-26 7:16 ` Sascha Hauer [this message]
2024-09-25 14:06 ` [PATCH 3/3] spi: spi-gpio: switch to new gpio binding Sascha Hauer
2024-09-26 6:09 ` Ahmad Fatoum
2024-09-26 8:19 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZvUKMrQckfAELL8M@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox