From: Geert Uytterhoeven <geert@linux-m68k.org>
To: David Lechner <david@lechnology.com>
Cc: linux-spi <linux-spi@vger.kernel.org>,
linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Mark Brown <broonie@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] spi: spi-davinci: Add support for SPI_CS_WORD
Date: Thu, 13 Sep 2018 15:44:43 +0200 [thread overview]
Message-ID: <CAMuHMdUb=sXBBRLhKNxsWT_Z4PCoLcM16NajvmPVHWsvgoL7_w@mail.gmail.com> (raw)
In-Reply-To: <20180913003920.30600-5-david@lechnology.com>
Hi David,
On Thu, Sep 13, 2018 at 2:40 AM David Lechner <david@lechnology.com> wrote:
> This adds support for the SPI_CS_WORD flag to the TI DaVinci SPI
> driver. This mode can be used as long as we are using the hardware
> chip select and not a GPIO chip select.
>
> Signed-off-by: David Lechner <david@lechnology.com>
> ---
> drivers/spi/spi-davinci.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
> index d502cf504deb..8f7dcbc53c57 100644
> --- a/drivers/spi/spi-davinci.c
> +++ b/drivers/spi/spi-davinci.c
> @@ -230,7 +230,8 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value)
> !(spi->mode & SPI_CS_HIGH));
> } else {
> if (value == BITBANG_CS_ACTIVE) {
> - spidat1 |= SPIDAT1_CSHOLD_MASK;
> + if (!(spi->mode & SPI_CS_WORD))
> + spidat1 |= SPIDAT1_CSHOLD_MASK;
> spidat1 &= ~(0x1 << chip_sel);
> }
> }
> @@ -440,8 +441,12 @@ static int davinci_spi_setup(struct spi_device *spi)
> return retval;
> }
>
> - if (internal_cs)
> + if (internal_cs) {
> set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
> + } else if (spi->mode & SPI_CS_WORD) {
> + dev_err(&spi->dev, "SPI_CS_WORD can't be use with GPIO CS\n");
> + return -EINVAL;
Does the SPI core fall back to splitting the transfer in this case?
> + }
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2018-09-13 13:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 0:39 [PATCH v2 0/4] spi: introduce SPI_CS_WORD mode flag David Lechner
2018-09-13 0:39 ` [PATCH v2 1/4] spi: add new SPI_CS_WORD flag David Lechner
2018-09-16 11:29 ` Jonathan Cameron
2018-09-13 0:39 ` [PATCH v2 2/4] spi: add software implementation for SPI_CS_WORD David Lechner
2018-09-16 11:32 ` Jonathan Cameron
2018-09-17 21:22 ` Applied "spi: add software implementation for SPI_CS_WORD" to the spi tree Mark Brown
2018-09-13 0:39 ` [PATCH v2 3/4] iio: adc: ti-ads7950: use SPI_CS_WORD to reduce CPU usage David Lechner
2018-09-16 11:41 ` Jonathan Cameron
2018-09-16 16:24 ` David Lechner
2018-09-17 8:33 ` Jonathan Cameron
2018-09-13 0:39 ` [PATCH v2 4/4] spi: spi-davinci: Add support for SPI_CS_WORD David Lechner
2018-09-13 13:44 ` Geert Uytterhoeven [this message]
2018-09-13 14:26 ` David Lechner
2018-09-17 21:18 ` Mark Brown
2018-09-17 21:17 ` [PATCH v2 0/4] spi: introduce SPI_CS_WORD mode flag Mark Brown
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='CAMuHMdUb=sXBBRLhKNxsWT_Z4PCoLcM16NajvmPVHWsvgoL7_w@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=broonie@kernel.org \
--cc=david@lechnology.com \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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;
as well as URLs for NNTP newsgroup(s).