diff options
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/Kconfig | 3 | ||||
-rw-r--r-- | drivers/iio/adc/at91_adc.c | 8 | ||||
-rw-r--r-- | drivers/iio/adc/mcp320x.c | 2 | ||||
-rw-r--r-- | drivers/iio/adc/rockchip_saradc.c | 4 | ||||
-rw-r--r-- | drivers/iio/adc/twl4030-madc.c | 3 | ||||
-rw-r--r-- | drivers/iio/adc/vf610_adc.c | 2 |
6 files changed, 14 insertions, 8 deletions
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 7c5565891cb8..eb0cd897714a 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig | |||
@@ -153,8 +153,7 @@ config DA9150_GPADC | |||
153 | 153 | ||
154 | config CC10001_ADC | 154 | config CC10001_ADC |
155 | tristate "Cosmic Circuits 10001 ADC driver" | 155 | tristate "Cosmic Circuits 10001 ADC driver" |
156 | depends on HAVE_CLK || REGULATOR | 156 | depends on HAS_IOMEM && HAVE_CLK && REGULATOR |
157 | depends on HAS_IOMEM | ||
158 | select IIO_BUFFER | 157 | select IIO_BUFFER |
159 | select IIO_TRIGGERED_BUFFER | 158 | select IIO_TRIGGERED_BUFFER |
160 | help | 159 | help |
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 8a0eb4a04fb5..7b40925dd4ff 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c | |||
@@ -182,7 +182,7 @@ struct at91_adc_caps { | |||
182 | u8 ts_pen_detect_sensitivity; | 182 | u8 ts_pen_detect_sensitivity; |
183 | 183 | ||
184 | /* startup time calculate function */ | 184 | /* startup time calculate function */ |
185 | u32 (*calc_startup_ticks)(u8 startup_time, u32 adc_clk_khz); | 185 | u32 (*calc_startup_ticks)(u32 startup_time, u32 adc_clk_khz); |
186 | 186 | ||
187 | u8 num_channels; | 187 | u8 num_channels; |
188 | struct at91_adc_reg_desc registers; | 188 | struct at91_adc_reg_desc registers; |
@@ -201,7 +201,7 @@ struct at91_adc_state { | |||
201 | u8 num_channels; | 201 | u8 num_channels; |
202 | void __iomem *reg_base; | 202 | void __iomem *reg_base; |
203 | struct at91_adc_reg_desc *registers; | 203 | struct at91_adc_reg_desc *registers; |
204 | u8 startup_time; | 204 | u32 startup_time; |
205 | u8 sample_hold_time; | 205 | u8 sample_hold_time; |
206 | bool sleep_mode; | 206 | bool sleep_mode; |
207 | struct iio_trigger **trig; | 207 | struct iio_trigger **trig; |
@@ -779,7 +779,7 @@ ret: | |||
779 | return ret; | 779 | return ret; |
780 | } | 780 | } |
781 | 781 | ||
782 | static u32 calc_startup_ticks_9260(u8 startup_time, u32 adc_clk_khz) | 782 | static u32 calc_startup_ticks_9260(u32 startup_time, u32 adc_clk_khz) |
783 | { | 783 | { |
784 | /* | 784 | /* |
785 | * Number of ticks needed to cover the startup time of the ADC | 785 | * Number of ticks needed to cover the startup time of the ADC |
@@ -790,7 +790,7 @@ static u32 calc_startup_ticks_9260(u8 startup_time, u32 adc_clk_khz) | |||
790 | return round_up((startup_time * adc_clk_khz / 1000) - 1, 8) / 8; | 790 | return round_up((startup_time * adc_clk_khz / 1000) - 1, 8) / 8; |
791 | } | 791 | } |
792 | 792 | ||
793 | static u32 calc_startup_ticks_9x5(u8 startup_time, u32 adc_clk_khz) | 793 | static u32 calc_startup_ticks_9x5(u32 startup_time, u32 adc_clk_khz) |
794 | { | 794 | { |
795 | /* | 795 | /* |
796 | * For sama5d3x and at91sam9x5, the formula changes to: | 796 | * For sama5d3x and at91sam9x5, the formula changes to: |
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c index 8d9c9b9215dd..d819823f7257 100644 --- a/drivers/iio/adc/mcp320x.c +++ b/drivers/iio/adc/mcp320x.c | |||
@@ -299,6 +299,8 @@ static int mcp320x_probe(struct spi_device *spi) | |||
299 | indio_dev->channels = chip_info->channels; | 299 | indio_dev->channels = chip_info->channels; |
300 | indio_dev->num_channels = chip_info->num_channels; | 300 | indio_dev->num_channels = chip_info->num_channels; |
301 | 301 | ||
302 | adc->chip_info = chip_info; | ||
303 | |||
302 | adc->transfer[0].tx_buf = &adc->tx_buf; | 304 | adc->transfer[0].tx_buf = &adc->tx_buf; |
303 | adc->transfer[0].len = sizeof(adc->tx_buf); | 305 | adc->transfer[0].len = sizeof(adc->tx_buf); |
304 | adc->transfer[1].rx_buf = adc->rx_buf; | 306 | adc->transfer[1].rx_buf = adc->rx_buf; |
diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c index 8d4e019ea4ca..9c311c1e1ac7 100644 --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c | |||
@@ -349,3 +349,7 @@ static struct platform_driver rockchip_saradc_driver = { | |||
349 | }; | 349 | }; |
350 | 350 | ||
351 | module_platform_driver(rockchip_saradc_driver); | 351 | module_platform_driver(rockchip_saradc_driver); |
352 | |||
353 | MODULE_AUTHOR("Heiko Stuebner <heiko@sntech.de>"); | ||
354 | MODULE_DESCRIPTION("Rockchip SARADC driver"); | ||
355 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c index 06f4792240f0..ebe415f10640 100644 --- a/drivers/iio/adc/twl4030-madc.c +++ b/drivers/iio/adc/twl4030-madc.c | |||
@@ -833,7 +833,8 @@ static int twl4030_madc_probe(struct platform_device *pdev) | |||
833 | irq = platform_get_irq(pdev, 0); | 833 | irq = platform_get_irq(pdev, 0); |
834 | ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, | 834 | ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, |
835 | twl4030_madc_threaded_irq_handler, | 835 | twl4030_madc_threaded_irq_handler, |
836 | IRQF_TRIGGER_RISING, "twl4030_madc", madc); | 836 | IRQF_TRIGGER_RISING | IRQF_ONESHOT, |
837 | "twl4030_madc", madc); | ||
837 | if (ret) { | 838 | if (ret) { |
838 | dev_err(&pdev->dev, "could not request irq\n"); | 839 | dev_err(&pdev->dev, "could not request irq\n"); |
839 | goto err_i2c; | 840 | goto err_i2c; |
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c index 480f335a0f9f..819632bf1fda 100644 --- a/drivers/iio/adc/vf610_adc.c +++ b/drivers/iio/adc/vf610_adc.c | |||
@@ -635,7 +635,7 @@ static int vf610_adc_reg_access(struct iio_dev *indio_dev, | |||
635 | struct vf610_adc *info = iio_priv(indio_dev); | 635 | struct vf610_adc *info = iio_priv(indio_dev); |
636 | 636 | ||
637 | if ((readval == NULL) || | 637 | if ((readval == NULL) || |
638 | (!(reg % 4) || (reg > VF610_REG_ADC_PCTL))) | 638 | ((reg % 4) || (reg > VF610_REG_ADC_PCTL))) |
639 | return -EINVAL; | 639 | return -EINVAL; |
640 | 640 | ||
641 | *readval = readl(info->regs + reg); | 641 | *readval = readl(info->regs + reg); |