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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.20 (GNU/Linux)
 
 iQIcBAABAgAGBQJRnUDZAAoJEFSFNJnE9BaICsQQALIu6naaYSQ1inFJ4lPkyU64
 q52c0QYtOFVrATTMApuIFR162nZgyBxQJ+QXLKFx52lrxDDBRcjvgIsScMFZR9Bv
 PCLz0ErZLKOYw+azPFZGy/jJKi1gHKT0Zy2DKt6hgi3dhujGCfDAHb9gFr41Q9z3
 h3Yu2g45BcMPt+h0nxny82YoHBY/fXV56rNhZQIIw3RBZgk2GxlXSU6cEiaImlWT
 faCD6DhxrpGbnv0E0x3K5b3cKHhb883XMkKL6wY/6zQ3U4ey/uK4uQliTpYv+Gic
 HhVdHP7mJ3lK/tsDhiK0znOGPotAuNilRu3qJ03195pzHI9RPAIxzM/+Xd3YnNkp
 /RIVNsy6iRY/0lRx6Hta8yif8933e2qWOzLN1anyDmus7BKVaoV7WcwBbqlPj8R2
 sI3x+nuxKUnnGVVBvUx4k9PC0f12ob2Hu97hYHaj++kJXrnRJU+OVt46JqUSnTys
 autYPXLiE6kf/KyVymhhUOtTCIqwROlBb5Jun92H4TYIFyI8HFfbE8lxZ/mf58zw
 SS0/D410gUQLxlzbasS3HMR8byUSb9SMuSvjMvLsQ+PBPijJ7Z26P2DMgZTyMIX9
 GlEMJGj30uUQeApoDsrWNDlyy7f5ExZQOGfR2lVmKHkLo/WhXoMJYNVTwYrH3gim
 ByFQfHo4jQrl4NtE0+ru
 =Slky
 -----END PGP SIGNATURE-----

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.
This commit is contained in:
Greg Kroah-Hartman 2013-05-22 15:11:31 -07:00
commit ed644baab6
5 changed files with 16 additions and 14 deletions

View File

@ -390,8 +390,8 @@ static int exynos_adc_remove(struct platform_device *pdev)
#ifdef CONFIG_PM_SLEEP
static int exynos_adc_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct exynos_adc *info = platform_get_drvdata(pdev);
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct exynos_adc *info = iio_priv(indio_dev);
u32 con;
if (info->version == ADC_V2) {
@ -413,8 +413,8 @@ static int exynos_adc_suspend(struct device *dev)
static int exynos_adc_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct exynos_adc *info = platform_get_drvdata(pdev);
struct iio_dev *indio_dev = dev_get_drvdata(dev);
struct exynos_adc *info = iio_priv(indio_dev);
int ret;
ret = regulator_enable(info->vdd);

View File

@ -312,6 +312,8 @@ int st_sensors_read_info_raw(struct iio_dev *indio_dev,
goto read_error;
*val = *val >> ch->scan_type.shift;
err = st_sensors_set_enable(indio_dev, false);
}
mutex_unlock(&indio_dev->mlock);

View File

@ -5,7 +5,7 @@ menu "Digital to analog converters"
config AD5064
tristate "Analog Devices AD5064 and similar multi-channel DAC driver"
depends on (SPI_MASTER || I2C)
depends on (SPI_MASTER && I2C!=m) || I2C
help
Say yes here to build support for Analog Devices AD5024, AD5025, AD5044,
AD5045, AD5064, AD5064-1, AD5065, AD5628, AD5629R, AD5648, AD5666, AD5668,
@ -27,7 +27,7 @@ config AD5360
config AD5380
tristate "Analog Devices AD5380/81/82/83/84/90/91/92 DAC driver"
depends on (SPI_MASTER || I2C)
depends on (SPI_MASTER && I2C!=m) || I2C
select REGMAP_I2C if I2C
select REGMAP_SPI if SPI_MASTER
help
@ -57,7 +57,7 @@ config AD5624R_SPI
config AD5446
tristate "Analog Devices AD5446 and similar single channel DACs driver"
depends on (SPI_MASTER || I2C)
depends on (SPI_MASTER && I2C!=m) || I2C
help
Say yes here to build support for Analog Devices AD5300, AD5301, AD5310,
AD5311, AD5320, AD5321, AD5444, AD5446, AD5450, AD5451, AD5452, AD5453,

View File

@ -690,7 +690,6 @@ static void mxs_lradc_trigger_remove(struct iio_dev *iio)
static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
{
struct mxs_lradc *lradc = iio_priv(iio);
struct iio_buffer *buffer = iio->buffer;
int ret = 0, chan, ofs = 0;
unsigned long enable = 0;
uint32_t ctrl4_set = 0;
@ -698,7 +697,7 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
uint32_t ctrl1_irq = 0;
const uint32_t chan_value = LRADC_CH_ACCUMULATE |
((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
const int len = bitmap_weight(buffer->scan_mask, LRADC_MAX_TOTAL_CHANS);
const int len = bitmap_weight(iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS);
if (!len)
return -EINVAL;
@ -725,7 +724,7 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
lradc->base + LRADC_CTRL1 + STMP_OFFSET_REG_CLR);
writel(0xff, lradc->base + LRADC_CTRL0 + STMP_OFFSET_REG_CLR);
for_each_set_bit(chan, buffer->scan_mask, LRADC_MAX_TOTAL_CHANS) {
for_each_set_bit(chan, iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS) {
ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
ctrl4_clr |= LRADC_CTRL4_LRADCSELECT_MASK(ofs);
ctrl1_irq |= LRADC_CTRL1_LRADC_IRQ_EN(ofs);

View File

@ -1869,6 +1869,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
dev_info(&chip->client->dev,
"%s: i2c device found does not match expected id\n",
__func__);
ret = -EINVAL;
goto fail1;
}
@ -1907,7 +1908,7 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
if (ret) {
dev_err(&clientp->dev,
"%s: irq request failed", __func__);
goto fail2;
goto fail1;
}
}
@ -1920,17 +1921,17 @@ static int tsl2x7x_probe(struct i2c_client *clientp,
if (ret) {
dev_err(&clientp->dev,
"%s: iio registration failed\n", __func__);
goto fail1;
goto fail2;
}
dev_info(&clientp->dev, "%s Light sensor found.\n", id->name);
return 0;
fail1:
fail2:
if (clientp->irq)
free_irq(clientp->irq, indio_dev);
fail2:
fail1:
iio_device_free(indio_dev);
return ret;