From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] spi: davinci: fix SPI_NO_CS functionality
Date: Thu, 21 Aug 2014 18:25:05 +0300 [thread overview]
Message-ID: <1408634706-5762-2-git-send-email-grygorii.strashko@ti.com> (raw)
In-Reply-To: <1408634706-5762-1-git-send-email-grygorii.strashko@ti.com>
The driver should not touch CS lines if SPI_NO_CS flag is set.
This patch fixes it as this functionality was broken accidentally
by
commit a88e34ea213e1b ("spi: davinci: add support to configure gpio cs through dt").
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/spi/spi-davinci.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c
index 276a388..48f1d26 100644
--- a/drivers/spi/spi-davinci.c
+++ b/drivers/spi/spi-davinci.c
@@ -417,16 +417,16 @@ static int davinci_spi_setup(struct spi_device *spi)
flags, dev_name(&spi->dev));
internal_cs = false;
}
- }
- if (retval) {
- dev_err(&spi->dev, "GPIO %d setup failed (%d)\n",
- spi->cs_gpio, retval);
- return retval;
- }
+ if (retval) {
+ dev_err(&spi->dev, "GPIO %d setup failed (%d)\n",
+ spi->cs_gpio, retval);
+ return retval;
+ }
- if (internal_cs)
- set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
+ if (internal_cs)
+ set_io_bits(dspi->base + SPIPC0, 1 << spi->chip_select);
+ }
if (spi->mode & SPI_READY)
set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK);
--
1.7.9.5
next prev parent reply other threads:[~2014-08-21 15:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 15:25 [PATCH 0/2] spi: davinci: fixes and updates Grygorii Strashko
2014-08-21 15:25 ` Grygorii Strashko [this message]
2014-08-21 18:10 ` [PATCH 1/2] spi: davinci: fix SPI_NO_CS functionality Mark Brown
2014-08-21 15:25 ` [PATCH 2/2] spi: davinci: support adding delay between transmission Grygorii Strashko
2014-08-21 18:20 ` Mark Brown
2014-08-22 13:33 ` Grygorii Strashko
2014-08-22 15:06 ` Mark Brown
2014-09-05 14:21 ` Grygorii Strashko
2014-09-06 14:31 ` Mark Brown
2014-09-08 13:30 ` Grygorii Strashko
2014-09-08 14:39 ` 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=1408634706-5762-2-git-send-email-grygorii.strashko@ti.com \
--to=grygorii.strashko@ti.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).