iio: adc: ad7606: Add software configuration

Because this driver will support multiple configurations for software,
the software configuration was made generic.

Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Beniamin Bia
2019-05-27 15:56:48 +03:00
committed by Jonathan Cameron
parent 88dd031350
commit 3c23e9e808
2 changed files with 39 additions and 3 deletions

View File

@@ -43,6 +43,7 @@ struct ad7606_chip_info {
* @range voltage range selection, selects which scale to apply
* @oversampling oversampling selection
* @base_address address from where to read data in parallel operation
* @sw_mode_en software mode enabled
* @scale_avail pointer to the array which stores the available scales
* @num_scales number of elements stored in the scale_avail array
* @oversampling_avail pointer to the array which stores the available
@@ -71,6 +72,7 @@ struct ad7606_state {
unsigned int range[16];
unsigned int oversampling;
void __iomem *base_address;
bool sw_mode_en;
const unsigned int *scale_avail;
unsigned int num_scales;
const unsigned int *oversampling_avail;