File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,21 @@ static int ad7768_probe(struct spi_device *spi)
572
572
return - ENOMEM ;
573
573
574
574
st = iio_priv (indio_dev );
575
+ /*
576
+ * Datasheet recommends SDI line to be kept high when data is not being
577
+ * clocked out of the controller and the spi clock is free running,
578
+ * to prevent accidental reset.
579
+ * Since many controllers do not support the SPI_MOSI_IDLE_HIGH flag
580
+ * yet, only request the MOSI idle state to enable if the controller
581
+ * supports it.
582
+ */
583
+ if (spi -> controller -> mode_bits & SPI_MOSI_IDLE_HIGH ) {
584
+ spi -> mode |= SPI_MOSI_IDLE_HIGH ;
585
+ ret = spi_setup (spi );
586
+ if (ret < 0 )
587
+ return ret ;
588
+ }
589
+
575
590
st -> spi = spi ;
576
591
577
592
st -> vref = devm_regulator_get (& spi -> dev , "vref" );
You can’t perform that action at this time.
0 commit comments