Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for adaq776x-1 series and add missing features #2587

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
9 changes: 9 additions & 0 deletions drivers/iio/adc/ad7768-1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,15 @@ static int ad7768_probe(struct spi_device *spi)
return -ENOMEM;

st = iio_priv(indio_dev);
/*
* The ADC SDI line must be kept high when
* data is not being clocked out of the controller.
* Request the SPI controller to make MOSI idle high.
*/
spi->mode |= SPI_MOSI_IDLE_HIGH;
ret = spi_setup(spi);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a Fixes tag and be the first patch in the pull. Fixes should always come first in case we want to backport them.

Also wondering why this was never caught...

Copy link
Author

@jonathanns jonathanns Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i will separate the fixes and move them to the beginning.
without that the device works, but not consistently. So I guess this slipped through.

if (ret < 0)
return ret;
st->spi = spi;

st->regulator = devm_regulator_get(&spi->dev, "vref");
Expand Down