mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device
@ 2012-05-16 12:02 Alexander Shiyan
  2012-05-16 12:02 ` [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect Alexander Shiyan
  2012-05-16 17:20 ` [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Shiyan @ 2012-05-16 12:02 UTC (permalink / raw)
  To: barebox

To avoid unnecessary preset initial state chipselect lines for SPI, set it to
inactive state when adding devices to the system.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/spi/imx_spi.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index 3b33b66..42358f2 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -145,6 +145,10 @@ struct spi_imx_devtype_data {
 
 static int imx_spi_setup(struct spi_device *spi)
 {
+	struct imx_spi *imx = container_of(spi->master, struct imx_spi, master);
+
+	imx->chipselect(spi, 0);
+
 	debug("%s mode 0x%08x bits_per_word: %d speed: %d\n",
 			__FUNCTION__, spi->mode, spi->bits_per_word,
 			spi->max_speed_hz);
-- 
1.7.3.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-16 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16 12:02 [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Alexander Shiyan
2012-05-16 12:02 ` [PATCH 2/2] PCM038: Remove now unused preset for SPI chipselect Alexander Shiyan
2012-05-16 17:20 ` [PATCH 1/2] i.MX SPI: Setup SPI chipselect to inactive state while initializing device Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox