diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-12 19:29:44 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-12 19:29:44 (GMT) |
commit | bd972ff3176caf91a49d1d754848c3f6c5435328 (patch) | |
tree | f832d242ed104ff8f4b84a409bc200b719bdb758 /drivers/staging/iio | |
parent | fc6ed2c6411e3ee0a3775d6d822f9b0169cc40a2 (diff) | |
parent | bbdb822c4c3f8dbefd8f6dc84f6d98c33af6e051 (diff) | |
download | linux-fsl-qoriq-bd972ff3176caf91a49d1d754848c3f6c5435328.tar.xz |
Merge tag 'togreg-3.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
IIO: One new driver and a couple of nice cleanups.
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/Documentation/sysfs-bus-iio-light | 23 | ||||
-rw-r--r-- | drivers/staging/iio/adc/ad7192.c | 10 | ||||
-rw-r--r-- | drivers/staging/iio/adc/ad7793.c | 14 | ||||
-rw-r--r-- | drivers/staging/iio/meter/ade7758.h | 1 | ||||
-rw-r--r-- | drivers/staging/iio/meter/ade7758_core.c | 7 | ||||
-rw-r--r-- | drivers/staging/iio/meter/ade7758_ring.c | 1 |
6 files changed, 30 insertions, 26 deletions
diff --git a/drivers/staging/iio/Documentation/sysfs-bus-iio-light b/drivers/staging/iio/Documentation/sysfs-bus-iio-light index d52be03..17e5c9c 100644 --- a/drivers/staging/iio/Documentation/sysfs-bus-iio-light +++ b/drivers/staging/iio/Documentation/sysfs-bus-iio-light @@ -82,3 +82,26 @@ Contact: linux-iio@vger.kernel.org Description: This property gets/sets the table of coefficients used in calculating illuminance in lux. + +What: /sys/bus/iio/devices/device[n]/in_intensity_clear[_input|_raw] +What: /sys/bus/iio/devices/device[n]/in_intensity_red[_input|_raw] +What: /sys/bus/iio/devices/device[n]/in_intensity_green[_input|_raw] +What: /sys/bus/iio/devices/device[n]/in_intensity_blue[_input|_raw] +KernelVersion: 3.6.0 +Contact: linux-iio@vger.kernel.org +Description: + This property is supported by sensors that have a RGBC + sensing mode. This value should be the output from a reading + and if expressed in SI units, should include _input. If this + value is not in SI units (irradiance, uW/mm^2), then it should + include _raw. + +What: /sys/bus/iio/devices/device[n]/in_cct0[_input|_raw] +KernelVersion: 3.6.0 +Contact: linux-iio@vger.kernel.org +Description: + This should return the correlated color temperature from the + light sensor. If it comes back in SI units, it should also + include _input else it should include _raw to signify it is not + in SI units. + diff --git a/drivers/staging/iio/adc/ad7192.c b/drivers/staging/iio/adc/ad7192.c index 839f17c4..22c3923 100644 --- a/drivers/staging/iio/adc/ad7192.c +++ b/drivers/staging/iio/adc/ad7192.c @@ -146,7 +146,6 @@ struct ad7192_state { u32 mode; u32 conf; u32 scale_avail[8][2]; - long available_scan_masks[9]; u8 gpocon; u8 devid; /* @@ -538,6 +537,7 @@ static const struct iio_buffer_setup_ops ad7192_ring_setup_ops = { .postenable = &iio_triggered_buffer_postenable, .predisable = &iio_triggered_buffer_predisable, .postdisable = &ad7192_ring_postdisable, + .validate_scan_mask = &iio_validate_scan_mask_onehot, }; static int ad7192_register_ring_funcs_and_init(struct iio_dev *indio_dev) @@ -984,7 +984,7 @@ static int __devinit ad7192_probe(struct spi_device *spi) struct ad7192_platform_data *pdata = spi->dev.platform_data; struct ad7192_state *st; struct iio_dev *indio_dev; - int ret, i , voltage_uv = 0; + int ret , voltage_uv = 0; if (!pdata) { dev_err(&spi->dev, "no platform data?\n"); @@ -1028,17 +1028,11 @@ static int __devinit ad7192_probe(struct spi_device *spi) indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = ad7192_channels; indio_dev->num_channels = ARRAY_SIZE(ad7192_channels); - indio_dev->available_scan_masks = st->available_scan_masks; if (st->devid == ID_AD7195) indio_dev->info = &ad7195_info; else indio_dev->info = &ad7192_info; - for (i = 0; i < indio_dev->num_channels; i++) - st->available_scan_masks[i] = (1 << i) | (1 << - indio_dev->channels[indio_dev->num_channels - 1]. - scan_index); - init_waitqueue_head(&st->wq_data_avail); ret = ad7192_register_ring_funcs_and_init(indio_dev); diff --git a/drivers/staging/iio/adc/ad7793.c b/drivers/staging/iio/adc/ad7793.c index eaa0cc9..76fdd71 100644 --- a/drivers/staging/iio/adc/ad7793.c +++ b/drivers/staging/iio/adc/ad7793.c @@ -52,8 +52,7 @@ struct ad7793_state { u16 mode; u16 conf; u32 scale_avail[8][2]; - /* Note this uses fact that 8 the mask always fits in a long */ - unsigned long available_scan_masks[7]; + /* * DMA (thus cache coherency maintenance) requires the * transfer buffers to live in their own cache lines. @@ -403,6 +402,7 @@ static const struct iio_buffer_setup_ops ad7793_ring_setup_ops = { .postenable = &iio_triggered_buffer_postenable, .predisable = &iio_triggered_buffer_predisable, .postdisable = &ad7793_ring_postdisable, + .validate_scan_mask = &iio_validate_scan_mask_onehot, }; static int ad7793_register_ring_funcs_and_init(struct iio_dev *indio_dev) @@ -864,7 +864,7 @@ static int __devinit ad7793_probe(struct spi_device *spi) struct ad7793_platform_data *pdata = spi->dev.platform_data; struct ad7793_state *st; struct iio_dev *indio_dev; - int ret, i, voltage_uv = 0; + int ret, voltage_uv = 0; if (!pdata) { dev_err(&spi->dev, "no platform data?\n"); @@ -910,17 +910,9 @@ static int __devinit ad7793_probe(struct spi_device *spi) indio_dev->name = spi_get_device_id(spi)->name; indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = st->chip_info->channel; - indio_dev->available_scan_masks = st->available_scan_masks; indio_dev->num_channels = 7; indio_dev->info = &ad7793_info; - for (i = 0; i < indio_dev->num_channels; i++) { - set_bit(i, &st->available_scan_masks[i]); - set_bit(indio_dev-> - channels[indio_dev->num_channels - 1].scan_index, - &st->available_scan_masks[i]); - } - init_waitqueue_head(&st->wq_data_avail); ret = ad7793_register_ring_funcs_and_init(indio_dev); diff --git a/drivers/staging/iio/meter/ade7758.h b/drivers/staging/iio/meter/ade7758.h index bdd1b05..ec202b4 100644 --- a/drivers/staging/iio/meter/ade7758.h +++ b/drivers/staging/iio/meter/ade7758.h @@ -122,7 +122,6 @@ struct ade7758_state { u8 *tx; u8 *rx; struct mutex buf_lock; - unsigned long available_scan_masks[AD7758_NUM_WAVESRC]; struct iio_chan_spec *ade7758_ring_channels; struct spi_transfer ring_xfer[4]; struct spi_message ring_msg; diff --git a/drivers/staging/iio/meter/ade7758_core.c b/drivers/staging/iio/meter/ade7758_core.c index 96d6114..7014a00 100644 --- a/drivers/staging/iio/meter/ade7758_core.c +++ b/drivers/staging/iio/meter/ade7758_core.c @@ -883,7 +883,7 @@ static const struct iio_info ade7758_info = { static int __devinit ade7758_probe(struct spi_device *spi) { - int i, ret; + int ret; struct ade7758_state *st; struct iio_dev *indio_dev = iio_device_alloc(sizeof(*st)); @@ -916,11 +916,6 @@ static int __devinit ade7758_probe(struct spi_device *spi) indio_dev->info = &ade7758_info; indio_dev->modes = INDIO_DIRECT_MODE; - for (i = 0; i < AD7758_NUM_WAVESRC; i++) - set_bit(i, &st->available_scan_masks[i]); - - indio_dev->available_scan_masks = st->available_scan_masks; - ret = ade7758_configure_ring(indio_dev); if (ret) goto error_free_tx; diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c index 92159f2..1ce10b2 100644 --- a/drivers/staging/iio/meter/ade7758_ring.c +++ b/drivers/staging/iio/meter/ade7758_ring.c @@ -114,6 +114,7 @@ static const struct iio_buffer_setup_ops ade7758_ring_setup_ops = { .preenable = &ade7758_ring_preenable, .postenable = &iio_triggered_buffer_postenable, .predisable = &iio_triggered_buffer_predisable, + .validate_scan_mask = &iio_validate_scan_mask_onehot, }; void ade7758_unconfigure_ring(struct iio_dev *indio_dev) |