From: <tthayer@opensource.altera.com>
To: <broonie@kernel.org>
Cc: <andriy.shevchenko@linux.intel.com>,
<jarkko.nikula@linux.intel.com>, <jszhang@marvell.com>,
<michael@smart-africa.com>, <kernel@mseidel.net>,
<linux-spi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<tthayer@opensource.altera.com>
Subject: [PATCHv3 2/2] spi: dw: Set GPIO_SS flag to toggle Slave Select on GPIO CS
Date: Mon, 10 Oct 2016 09:25:25 -0500 [thread overview]
Message-ID: <1476109525-21213-2-git-send-email-tthayer@opensource.altera.com> (raw)
In-Reply-To: <1476109525-21213-1-git-send-email-tthayer@opensource.altera.com>
From: Thor Thayer <tthayer@opensource.altera.com>
The Designware SPI master requires slave selection before the transfer
can begin [1].
This patch uses the new master flag to indicate both the GPIO CS and
the internal chip select should be used.
Tested On:
Altera CycloneV development kit
Compile tested for build errors on x86_64 (allyesconfigs)
[1] DesignWare dw_apb_ssi Databook, Version 3.20a (page 39)
Signed-off-by: Thor Thayer <tthayer@opensource.altera.com>
---
v3 Use SPI_MASTER_GPIO_SS
---
drivers/spi/spi-dw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/spi/spi-dw.c b/drivers/spi/spi-dw.c
index 27960e4..b715a26 100644
--- a/drivers/spi/spi-dw.c
+++ b/drivers/spi/spi-dw.c
@@ -502,6 +502,7 @@ int dw_spi_add_host(struct device *dev, struct dw_spi *dws)
master->handle_err = dw_spi_handle_err;
master->max_speed_hz = dws->max_freq;
master->dev.of_node = dev->of_node;
+ master->flags = SPI_MASTER_GPIO_SS;
/* Basic HW init */
spi_hw_init(dev, dws);
--
1.7.9.5
next prev parent reply other threads:[~2016-10-10 14:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 14:25 [PATCHv3 1/2] spi: Add Flag to Enable Slave Select with GPIO Chip Select tthayer
2016-10-10 14:25 ` tthayer [this message]
2016-10-11 10:30 ` Applied "spi: dw: Set GPIO_SS flag to toggle Slave Select on GPIO CS" to the spi tree Mark Brown
2016-10-11 10:30 ` Applied "spi: Add Flag to Enable Slave Select with GPIO Chip Select." " 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=1476109525-21213-2-git-send-email-tthayer@opensource.altera.com \
--to=tthayer@opensource.altera.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@linux.intel.com \
--cc=jszhang@marvell.com \
--cc=kernel@mseidel.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=michael@smart-africa.com \
/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
Powered by JetHome