diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2016-01-16 16:24:07 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-01-24 17:46:21 +0300 |
commit | 131497acd88a4456d99247cee457baefd2817835 (patch) | |
tree | 5272e44155727b8d3bf1ecc7380cc44bfac1da1c /include/linux/platform_data/ad5761.h | |
parent | 7ca6574a7afb669b0b4b30dd63adeb310e97e250 (diff) | |
download | linux-131497acd88a4456d99247cee457baefd2817835.tar.xz |
iio: add ad5761 DAC driver
ad5761 is a 1-channel DAC with configurable output range.
The driver uses the regulator interface for its voltage ref.
It shares its register layout with ad5761r, ad5721 and ad5721r.
Differences:
ad5761* are 16 bit, ad5721* are 12 bits.
ad57*1r have an internal reference.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/platform_data/ad5761.h')
-rw-r--r-- | include/linux/platform_data/ad5761.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/linux/platform_data/ad5761.h b/include/linux/platform_data/ad5761.h new file mode 100644 index 000000000000..7bd8ed7d978e --- /dev/null +++ b/include/linux/platform_data/ad5761.h @@ -0,0 +1,44 @@ +/* + * AD5721, AD5721R, AD5761, AD5761R, Voltage Output Digital to Analog Converter + * + * Copyright 2016 Qtechnology A/S + * 2016 Ricardo Ribalda <ricardo.ribalda@gmail.com> + * + * Licensed under the GPL-2. + */ +#ifndef __LINUX_PLATFORM_DATA_AD5761_H__ +#define __LINUX_PLATFORM_DATA_AD5761_H__ + +/** + * enum ad5761_voltage_range - Voltage range the AD5761 is configured for. + * @AD5761_VOLTAGE_RANGE_M10V_10V: -10V to 10V + * @AD5761_VOLTAGE_RANGE_0V_10V: 0V to 10V + * @AD5761_VOLTAGE_RANGE_M5V_5V: -5V to 5V + * @AD5761_VOLTAGE_RANGE_0V_5V: 0V to 5V + * @AD5761_VOLTAGE_RANGE_M2V5_7V5: -2.5V to 7.5V + * @AD5761_VOLTAGE_RANGE_M3V_3V: -3V to 3V + * @AD5761_VOLTAGE_RANGE_0V_16V: 0V to 16V + * @AD5761_VOLTAGE_RANGE_0V_20V: 0V to 20V + */ + +enum ad5761_voltage_range { + AD5761_VOLTAGE_RANGE_M10V_10V, + AD5761_VOLTAGE_RANGE_0V_10V, + AD5761_VOLTAGE_RANGE_M5V_5V, + AD5761_VOLTAGE_RANGE_0V_5V, + AD5761_VOLTAGE_RANGE_M2V5_7V5, + AD5761_VOLTAGE_RANGE_M3V_3V, + AD5761_VOLTAGE_RANGE_0V_16V, + AD5761_VOLTAGE_RANGE_0V_20V, +}; + +/** + * struct ad5761_platform_data - AD5761 DAC driver platform data + * @voltage_range: Voltage range the AD5761 is configured for + */ + +struct ad5761_platform_data { + enum ad5761_voltage_range voltage_range; +}; + +#endif |