From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Grant Likely <grant.likely@secretlab.ca>,
Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
spi-devel-general@lists.sourceforge.net,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 2/4] spi/s3c64xx: Put the /CS GPIO into output mode
Date: Wed, 18 Jul 2012 12:28:39 +0100 [thread overview]
Message-ID: <1342610921-31986-2-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1342610921-31986-1-git-send-email-broonie@opensource.wolfsonmicro.com>
No call was being made by the GPIO driver to put the GPIO into output
mode meaning that the calls to gpio_set_value() which were being done
were not valid. A similar issue appears to exist with the DT GPIO
requests but as they appear to be being used for pinmux it's less clear
to me that we want to configure them.
Without this fix Cragganmore systems can't talk to their SPI devices.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/spi/spi-s3c64xx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 7258b18..6ed3ba8 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -892,7 +892,8 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
}
if (!spi_get_ctldata(spi)) {
- err = gpio_request(cs->line, dev_name(&spi->dev));
+ err = gpio_request_one(cs->line, GPIOF_OUT_INIT_HIGH,
+ dev_name(&spi->dev));
if (err) {
dev_err(&spi->dev,
"Failed to get /CS gpio [%d]: %d\n",
--
1.7.10.4
next prev parent reply other threads:[~2012-07-18 11:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 11:28 [PATCH 1/4] spi/s3c64xx: Fix handling of errors in gpio_request() Mark Brown
2012-07-18 11:28 ` Mark Brown [this message]
2012-07-18 11:28 ` [PATCH 3/4] spi/s3c64xx: Convert to devm_request_and_ioremap() Mark Brown
2012-07-18 11:28 ` [PATCH 4/4] spi/s3c64xx: Expand S3C64XX_SPI_{DE,}ACT macros at call sites Mark Brown
2012-07-19 6:46 ` [PATCH 1/4] spi/s3c64xx: Fix handling of errors in gpio_request() Kukjin Kim
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=1342610921-31986-2-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=grant.likely@secretlab.ca \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.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).