diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-22 18:11:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-22 18:11:31 -0400 |
commit | ed644baab64d5c2e6e130a4794680eb06f7da81c (patch) | |
tree | a269890f81aa5b4d50163b92804fc690ce46ccf8 | |
parent | c7b0cf3e712775e8e2015c2f4582864159540be6 (diff) | |
parent | 927b4dc3e440a060bd7d9a7ecb83c3dcd80adc84 (diff) |
Merge tag 'iio-fixes-for-3.10a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus
Jonathan writes:
First round of IIO fixes for the 3.10 cycle.
The usual mixed bag of little fixes.
1) A fix for mxs-lradc having missed out on some global abi changes that and
hence being unable to start up buffered output.
2) Clean up error handling in tsl2x7x
3) A build fix for some of the dac drivers when they have spi master support
built in, but i2c support build as a module.
4) Add a missing disable after a oneshot capture to the st sensor core.
5) Exynos adc driver took a novel an incorrect route to get at its private
data store.
-rw-r--r-- | drivers/iio/adc/exynos_adc.c | 8 | ||||
-rw-r--r-- | drivers/iio/common/st_sensors/st_sensors_core.c | 2 | ||||
-rw-r--r-- | drivers/iio/dac/Kconfig | 6 | ||||
-rw-r--r-- | drivers/staging/iio/adc/mxs-lradc.c | 5 | ||||
-rw-r--r-- | drivers/staging/iio/light/tsl2x7x_core.c | 9 |
5 files changed, 16 insertions, 14 deletions
diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c index 9f3a8ef1fb3e..b3d03d335948 100644 --- a/drivers/iio/adc/exynos_adc.c +++ b/drivers/iio/adc/exynos_adc.c | |||
@@ -390,8 +390,8 @@ static int exynos_adc_remove(struct platform_device *pdev) | |||
390 | #ifdef CONFIG_PM_SLEEP | 390 | #ifdef CONFIG_PM_SLEEP |
391 | static int exynos_adc_suspend(struct device *dev) | 391 | static int exynos_adc_suspend(struct device *dev) |
392 | { | 392 | { |
393 | struct platform_device *pdev = to_platform_device(dev); | 393 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
394 | struct exynos_adc *info = platform_get_drvdata(pdev); | 394 | struct exynos_adc *info = iio_priv(indio_dev); |
395 | u32 con; | 395 | u32 con; |
396 | 396 | ||
397 | if (info->version == ADC_V2) { | 397 | if (info->version == ADC_V2) { |
@@ -413,8 +413,8 @@ static int exynos_adc_suspend(struct device *dev) | |||
413 | 413 | ||
414 | static int exynos_adc_resume(struct device *dev) | 414 | static int exynos_adc_resume(struct device *dev) |
415 | { | 415 | { |
416 | struct platform_device *pdev = to_platform_device(dev); | 416 | struct iio_dev *indio_dev = dev_get_drvdata(dev); |
417 | struct exynos_adc *info = platform_get_drvdata(pdev); | 417 | struct exynos_adc *info = iio_priv(indio_dev); |
418 | int ret; | 418 | int ret; |
419 | 419 | ||
420 | ret = regulator_enable(info->vdd); | 420 | ret = regulator_enable(info->vdd); |
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c index bd33473f8e38..ed9bc8ae9330 100644 --- a/drivers/iio/common/st_sensors/st_sensors_core.c +++ b/drivers/iio/common/st_sensors/st_sensors_core.c | |||
@@ -312,6 +312,8 @@ int st_sensors_read_info_raw(struct iio_dev *indio_dev, | |||
312 | goto read_error; | 312 | goto read_error; |
313 | 313 | ||
314 | *val = *val >> ch->scan_type.shift; | 314 | *val = *val >> ch->scan_type.shift; |
315 | |||
316 | err = st_sensors_set_enable(indio_dev, false); | ||
315 | } | 317 | } |
316 | mutex_unlock(&indio_dev->mlock); | 318 | mutex_unlock(&indio_dev->mlock); |
317 | 319 | ||
diff --git a/drivers/iio/dac/Kconfig b/drivers/iio/dac/Kconfig index f4a6f0838327..b61160bd935e 100644 --- a/drivers/iio/dac/Kconfig +++ b/drivers/iio/dac/Kconfig | |||
@@ -5,7 +5,7 @@ menu "Digital to analog converters" | |||
5 | 5 | ||
6 | config AD5064 | 6 | config AD5064 |
7 | tristate "Analog Devices AD5064 and similar multi-channel DAC driver" | 7 | tristate "Analog Devices AD5064 and similar multi-channel DAC driver" |
8 | depends on (SPI_MASTER || I2C) | 8 | depends on (SPI_MASTER && I2C!=m) || I2C |
9 | help | 9 | help |
10 | Say yes here to build support for Analog Devices AD5024, AD5025, AD5044, | 10 | Say yes here to build support for Analog Devices AD5024, AD5025, AD5044, |
11 | AD5045, AD5064, AD5064-1, AD5065, AD5628, AD5629R, AD5648, AD5666, AD5668, | 11 | AD5045, AD5064, AD5064-1, AD5065, AD5628, AD5629R, AD5648, AD5666, AD5668, |
@@ -27,7 +27,7 @@ config AD5360 | |||
27 | 27 | ||
28 | config AD5380 | 28 | config AD5380 |
29 | tristate "Analog Devices AD5380/81/82/83/84/90/91/92 DAC driver" | 29 | tristate "Analog Devices AD5380/81/82/83/84/90/91/92 DAC driver" |
30 | depends on (SPI_MASTER || I2C) | 30 | depends on (SPI_MASTER && I2C!=m) || I2C |
31 | select REGMAP_I2C if I2C | 31 | select REGMAP_I2C if I2C |
32 | select REGMAP_SPI if SPI_MASTER | 32 | select REGMAP_SPI if SPI_MASTER |
33 | help | 33 | help |
@@ -57,7 +57,7 @@ config AD5624R_SPI | |||
57 | 57 | ||
58 | config AD5446 | 58 | config AD5446 |
59 | tristate "Analog Devices AD5446 and similar single channel DACs driver" | 59 | tristate "Analog Devices AD5446 and similar single channel DACs driver" |
60 | depends on (SPI_MASTER || I2C) | 60 | depends on (SPI_MASTER && I2C!=m) || I2C |
61 | help | 61 | help |
62 | Say yes here to build support for Analog Devices AD5300, AD5301, AD5310, | 62 | Say yes here to build support for Analog Devices AD5300, AD5301, AD5310, |
63 | AD5311, AD5320, AD5321, AD5444, AD5446, AD5450, AD5451, AD5452, AD5453, | 63 | AD5311, AD5320, AD5321, AD5444, AD5446, AD5450, AD5451, AD5452, AD5453, |
diff --git a/drivers/staging/iio/adc/mxs-lradc.c b/drivers/staging/iio/adc/mxs-lradc.c index 2856b8fd44ad..163c638e4095 100644 --- a/drivers/staging/iio/adc/mxs-lradc.c +++ b/drivers/staging/iio/adc/mxs-lradc.c | |||
@@ -690,7 +690,6 @@ static void mxs_lradc_trigger_remove(struct iio_dev *iio) | |||
690 | static int mxs_lradc_buffer_preenable(struct iio_dev *iio) | 690 | static int mxs_lradc_buffer_preenable(struct iio_dev *iio) |
691 | { | 691 | { |
692 | struct mxs_lradc *lradc = iio_priv(iio); | 692 | struct mxs_lradc *lradc = iio_priv(iio); |
693 | struct iio_buffer *buffer = iio->buffer; | ||
694 | int ret = 0, chan, ofs = 0; | 693 | int ret = 0, chan, ofs = 0; |
695 | unsigned long enable = 0; | 694 | unsigned long enable = 0; |
696 | uint32_t ctrl4_set = 0; | 695 | uint32_t ctrl4_set = 0; |
@@ -698,7 +697,7 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio) | |||
698 | uint32_t ctrl1_irq = 0; | 697 | uint32_t ctrl1_irq = 0; |
699 | const uint32_t chan_value = LRADC_CH_ACCUMULATE | | 698 | const uint32_t chan_value = LRADC_CH_ACCUMULATE | |
700 | ((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET); | 699 | ((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET); |
701 | const int len = bitmap_weight(buffer->scan_mask, LRADC_MAX_TOTAL_CHANS); | 700 | const int len = bitmap_weight(iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS); |
702 | 701 | ||
703 | if (!len) | 702 | if (!len) |
704 | return -EINVAL; | 703 | return -EINVAL; |
@@ -725,7 +724,7 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio) | |||
725 | lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR); | 724 | lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR); |
726 | writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR); | 725 | writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR); |
727 | 726 | ||
728 | for_each_set_bit(chan, buffer->scan_mask, LRADC_MAX_TOTAL_CHANS) { | 727 | for_each_set_bit(chan, iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS) { |
729 | ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs); | 728 | ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs); |
730 | ctrl4_clr |= LRADC_CTRL4_LRADCSELECT_MASK(ofs); | 729 | ctrl4_clr |= LRADC_CTRL4_LRADCSELECT_MASK(ofs); |
731 | ctrl1_irq |= LRADC_CTRL1_LRADC_IRQ_EN(ofs); | 730 | ctrl1_irq |= LRADC_CTRL1_LRADC_IRQ_EN(ofs); |
diff --git a/drivers/staging/iio/light/tsl2x7x_core.c b/drivers/staging/iio/light/tsl2x7x_core.c index d060f2572512..c99f890cc6c6 100644 --- a/drivers/staging/iio/light/tsl2x7x_core.c +++ b/drivers/staging/iio/light/tsl2x7x_core.c | |||
@@ -1869,6 +1869,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp, | |||
1869 | dev_info(&chip->client->dev, | 1869 | dev_info(&chip->client->dev, |
1870 | "%s: i2c device found does not match expected id\n", | 1870 | "%s: i2c device found does not match expected id\n", |
1871 | __func__); | 1871 | __func__); |
1872 | ret = -EINVAL; | ||
1872 | goto fail1; | 1873 | goto fail1; |
1873 | } | 1874 | } |
1874 | 1875 | ||
@@ -1907,7 +1908,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp, | |||
1907 | if (ret) { | 1908 | if (ret) { |
1908 | dev_err(&clientp->dev, | 1909 | dev_err(&clientp->dev, |
1909 | "%s: irq request failed", __func__); | 1910 | "%s: irq request failed", __func__); |
1910 | goto fail2; | 1911 | goto fail1; |
1911 | } | 1912 | } |
1912 | } | 1913 | } |
1913 | 1914 | ||
@@ -1920,17 +1921,17 @@ static int tsl2x7x_probe(struct i2c_client *clientp, | |||
1920 | if (ret) { | 1921 | if (ret) { |
1921 | dev_err(&clientp->dev, | 1922 | dev_err(&clientp->dev, |
1922 | "%s: iio registration failed\n", __func__); | 1923 | "%s: iio registration failed\n", __func__); |
1923 | goto fail1; | 1924 | goto fail2; |
1924 | } | 1925 | } |
1925 | 1926 | ||
1926 | dev_info(&clientp->dev, "%s Light sensor found.\n", id->name); | 1927 | dev_info(&clientp->dev, "%s Light sensor found.\n", id->name); |
1927 | 1928 | ||
1928 | return 0; | 1929 | return 0; |
1929 | 1930 | ||
1930 | fail1: | 1931 | fail2: |
1931 | if (clientp->irq) | 1932 | if (clientp->irq) |
1932 | free_irq(clientp->irq, indio_dev); | 1933 | free_irq(clientp->irq, indio_dev); |
1933 | fail2: | 1934 | fail1: |
1934 | iio_device_free(indio_dev); | 1935 | iio_device_free(indio_dev); |
1935 | 1936 | ||
1936 | return ret; | 1937 | return ret; |