diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2018-11-13 13:20:24 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-11-17 16:30:00 +0000 |
commit | f0aef2d018643187101199d8af1dd5ea3a43a3b7 (patch) | |
tree | 0d56666747d53ff4f7418517451801ed41338921 /include/linux/iio | |
parent | c24a4173f6bbea49b09ae2c137db23035d3a7932 (diff) | |
download | blackbird-op-linux-f0aef2d018643187101199d8af1dd5ea3a43a3b7.tar.gz blackbird-op-linux-f0aef2d018643187101199d8af1dd5ea3a43a3b7.zip |
iio: ad_sigma_delta: Allow to provide custom data register address
Some newer devices from the Sigma-Delta ADC family do have their data
register at a different address than the current default address. Add a
parameter to the ad_sigma_delta_info struct which allows to override the
default address.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
-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 730ead1a46df..7e84351fa2c0 100644 --- a/include/linux/iio/adc/ad_sigma_delta.h +++ b/include/linux/iio/adc/ad_sigma_delta.h @@ -39,6 +39,8 @@ struct iio_dev; * if there is just one read-only sample data shift register. * @addr_shift: Shift of the register address in the communications register. * @read_mask: Mask for the communications register having the read bit set. + * @data_reg: Address of the data register, if 0 the default address of 0x3 will + * be used. */ struct ad_sigma_delta_info { int (*set_channel)(struct ad_sigma_delta *, unsigned int channel); @@ -47,6 +49,7 @@ struct ad_sigma_delta_info { bool has_registers; unsigned int addr_shift; unsigned int read_mask; + unsigned int data_reg; }; /** |