aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/adc/ad7606.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2018-11-03 23:42:16 +0100
committerIngo Molnar <mingo@kernel.org>2018-11-03 23:42:16 +0100
commit23a12ddee1ce28065b71f14ccc695b5a0c8a64ff (patch)
treecedaa1cde5b2557116e523c31552187804704093 /drivers/staging/iio/adc/ad7606.h
parentcompat: Cleanup in_compat_syscall() callers (diff)
parentobjtool: Support GCC 9 cold subfunction naming scheme (diff)
downloadlinux-dev-23a12ddee1ce28065b71f14ccc695b5a0c8a64ff.tar.xz
linux-dev-23a12ddee1ce28065b71f14ccc695b5a0c8a64ff.zip
Merge branch 'core/urgent' into x86/urgent, to pick up objtool fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad7606.h')
-rw-r--r--drivers/staging/iio/adc/ad7606.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/ad7606.h
index 9716ee9d94a7..86188054b60b 100644
--- a/drivers/staging/iio/adc/ad7606.h
+++ b/drivers/staging/iio/adc/ad7606.h
@@ -11,20 +11,40 @@
/**
* struct ad7606_chip_info - chip specific information
- * @name: identification string for chip
* @channels: channel specification
* @num_channels: number of channels
- * @lock protect sensor state
+ * @has_oversampling: whether the device has oversampling support
*/
struct ad7606_chip_info {
const struct iio_chan_spec *channels;
unsigned int num_channels;
+ bool has_oversampling;
};
/**
* struct ad7606_state - driver instance specific data
- * @lock protect sensor state
+ * @dev pointer to kernel device
+ * @chip_info entry in the table of chips that describes this device
+ * @reg regulator info for the the power supply of the device
+ * @poll_work work struct for continuously reading data from the device
+ * into an IIO triggered buffer
+ * @wq_data_avail wait queue struct for buffer mode
+ * @bops bus operations (SPI or parallel)
+ * @range voltage range selection, selects which scale to apply
+ * @oversampling oversampling selection
+ * @done marks whether reading data is done
+ * @base_address address from where to read data in parallel operation
+ * @lock protect sensor state from concurrent accesses to GPIOs
+ * @gpio_convst GPIO descriptor for conversion start signal (CONVST)
+ * @gpio_reset GPIO descriptor for device hard-reset
+ * @gpio_range GPIO descriptor for range selection
+ * @gpio_standby GPIO descriptor for stand-by signal (STBY),
+ * controls power-down mode of device
+ * @gpio_frstdata GPIO descriptor for reading from device when data
+ * is being read on the first channel
+ * @gpio_os GPIO descriptors to control oversampling on the device
+ * @data buffer for reading data from the device
*/
struct ad7606_state {
@@ -55,6 +75,10 @@ struct ad7606_state {
unsigned short data[12] ____cacheline_aligned;
};
+/**
+ * struct ad7606_bus_ops - driver bus operations
+ * @read_block function pointer for reading blocks of data
+ */
struct ad7606_bus_ops {
/* more methods added in future? */
int (*read_block)(struct device *dev, int num, void *data);
@@ -66,6 +90,7 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
int ad7606_remove(struct device *dev, int irq);
enum ad7606_supported_device_ids {
+ ID_AD7605_4,
ID_AD7606_8,
ID_AD7606_6,
ID_AD7606_4