diff options
author | Dragos Bogdan <dragos.bogdan@analog.com> | 2017-09-05 15:14:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-12 11:51:18 +0200 |
commit | 1f266a130329fb1bcc61fbffeb7dfe847c157f4b (patch) | |
tree | 47cb47e4d040a07495981ebcda90cc6d622ce9e4 /include | |
parent | a2002c92ffb3c378e4d0066d3fddb045acd939b9 (diff) | |
download | linux-stable-1f266a130329fb1bcc61fbffeb7dfe847c157f4b.tar.gz linux-stable-1f266a130329fb1bcc61fbffeb7dfe847c157f4b.tar.bz2 linux-stable-1f266a130329fb1bcc61fbffeb7dfe847c157f4b.zip |
iio: ad_sigma_delta: Implement a dedicated reset function
commit 7fc10de8d49a748c476532c9d8e8fe19e548dd67 upstream.
Since most of the SD ADCs have the option of reseting the serial
interface by sending a number of SCLKs with CS = 0 and DIN = 1,
a dedicated function that can do this is usefull.
Needed for the patch: iio: ad7793: Fix the serial interface reset
Signed-off-by: Dragos Bogdan <dragos.bogdan@analog.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/iio/adc/ad_sigma_delta.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iio/adc/ad_sigma_delta.h b/include/linux/iio/adc/ad_sigma_delta.h index e7fdec4db9da..6cc48ac55fd2 100644 --- a/include/linux/iio/adc/ad_sigma_delta.h +++ b/include/linux/iio/adc/ad_sigma_delta.h @@ -111,6 +111,9 @@ int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg, int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg, unsigned int size, unsigned int *val); +int ad_sd_reset(struct ad_sigma_delta *sigma_delta, + unsigned int reset_length); + int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, int *val); int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta, |