summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/adc/ad7606.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2016-10-19 20:07:07 +0300
committerJonathan Cameron <jic23@kernel.org>2016-10-23 21:34:17 +0300
commit722407a4e8c03a36736ea4a384688cf8cbf87f4b (patch)
treef89a00926cdff988c3f41d59c788512069a07bcd /drivers/staging/iio/adc/ad7606.h
parentf52666772d579233b5aa3e1fb57187bbec80fc50 (diff)
downloadlinux-722407a4e8c03a36736ea4a384688cf8cbf87f4b.tar.xz
staging:iio:ad7606: Use GPIO descriptor API
Convert the ad7606 driver away from the deprecated legacy GPIO API and use the new GPIO descriptor API. This also means that the platform data struct is now empty and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging/iio/adc/ad7606.h')
-rw-r--r--drivers/staging/iio/adc/ad7606.h35
1 files changed, 7 insertions, 28 deletions
diff --git a/drivers/staging/iio/adc/ad7606.h b/drivers/staging/iio/adc/ad7606.h
index 6dde987f15c1..f5f85faf3921 100644
--- a/drivers/staging/iio/adc/ad7606.h
+++ b/drivers/staging/iio/adc/ad7606.h
@@ -9,33 +9,6 @@
#ifndef IIO_ADC_AD7606_H_
#define IIO_ADC_AD7606_H_
-/*
- * TODO: struct ad7606_platform_data needs to go into include/linux/iio
- */
-
-/**
- * struct ad7606_platform_data - platform/board specific information
- * @gpio_convst: number of gpio connected to the CONVST pin
- * @gpio_reset: gpio connected to the RESET pin, if not used set to -1
- * @gpio_range: gpio connected to the RANGE pin, if not used set to -1
- * @gpio_os0: gpio connected to the OS0 pin, if not used set to -1
- * @gpio_os1: gpio connected to the OS1 pin, if not used set to -1
- * @gpio_os2: gpio connected to the OS2 pin, if not used set to -1
- * @gpio_frstdata: gpio connected to the FRSTDAT pin, if not used set to -1
- * @gpio_stby: gpio connected to the STBY pin, if not used set to -1
- */
-
-struct ad7606_platform_data {
- unsigned int gpio_convst;
- unsigned int gpio_reset;
- unsigned int gpio_range;
- unsigned int gpio_os0;
- unsigned int gpio_os1;
- unsigned int gpio_os2;
- unsigned int gpio_frstdata;
- unsigned int gpio_stby;
-};
-
/**
* struct ad7606_chip_info - chip specific information
* @name: identification string for chip
@@ -55,7 +28,6 @@ struct ad7606_chip_info {
struct ad7606_state {
struct device *dev;
const struct ad7606_chip_info *chip_info;
- struct ad7606_platform_data *pdata;
struct regulator *reg;
struct work_struct poll_work;
wait_queue_head_t wq_data_avail;
@@ -65,6 +37,13 @@ struct ad7606_state {
bool done;
void __iomem *base_address;
+ struct gpio_desc *gpio_convst;
+ struct gpio_desc *gpio_reset;
+ struct gpio_desc *gpio_range;
+ struct gpio_desc *gpio_standby;
+ struct gpio_desc *gpio_frstdata;
+ struct gpio_descs *gpio_os;
+
/*
* DMA (thus cache coherency maintenance) requires the
* transfer buffers to live in their own cache lines.