All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio:dac:ad5755 fixed SPI_MODE
@ 2016-01-27 14:39 Sean Nyekjaer
  2016-01-27 14:45 ` Lars-Peter Clausen
  0 siblings, 1 reply; 6+ messages in thread
From: Sean Nyekjaer @ 2016-01-27 14:39 UTC (permalink / raw)
  To: linux-iio; +Cc: Sean Nyekjaer, lars

According to datasheet data is latched on the falling edge of the SCK.

I agree it works in SPI_MODE_0 on the eval kit, but in other configurations
with optic isolators (that adds a small delay). We are falling out of spec.

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
---
 drivers/iio/dac/ad5755.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index bfb350a..189d29a 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -573,6 +573,8 @@ static int ad5755_probe(struct spi_device *spi)
 	st = iio_priv(indio_dev);
 	spi_set_drvdata(spi, indio_dev);
 
+	spi->mode = SPI_MODE_1;
+
 	st->chip_info = &ad5755_chip_info_tbl[type];
 	st->spi = spi;
 	st->pwr_down = 0xf;
-- 
2.7.0


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

end of thread, other threads:[~2016-01-30 15:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 14:39 [PATCH] iio:dac:ad5755 fixed SPI_MODE Sean Nyekjaer
2016-01-27 14:45 ` Lars-Peter Clausen
2016-01-27 15:33   ` Sean Nyekjær
2016-01-27 15:45     ` Lars-Peter Clausen
2016-01-28  7:29       ` Sean Nyekjær
2016-01-30 15:13         ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.