IIO mixed bag of trivial + fixes
Subsystems (4)
Jonathan Cameron
maintainerPATCH 2/5 staging:iio:accel:lis3l02dq add symmetry to check for presence of trigger.
In reply to Jonathan CameronChecking indio_dev->modes is uggly and not symmetric with the conditions on whether triggers are allowed in the first place.
--- drivers/staging/iio/accel/lis3l02dq_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/accel/lis3l02dq_core.c +1 -1
@@ -724,7 +724,7 @@ static int __devinit lis3l02dq_probe(struct spi_device *spi)return 0 ; error_remove_trigger: -if (indio_dev->modes &INDIO_BUFFER_TRIGGERED ) +if (spi->irq &&gpio_is_valid (irq_to_gpio (spi->irq)))lis3l02dq_remove_trigger (indio_dev); error_free_interrupt:if (spi->irq &&gpio_is_valid (irq_to_gpio (spi->irq)) >0 )
Signature · 1 line
1.7.9.2
Jonathan Cameron
maintainercover IIO mixed bag of trivial + fixes
Nothing terribly interesting, but as ever all comments welcome. If no one shouts I'll assume these are trivial enough to send on to Greg sometime next week.
Jonathan
Jonathan Cameron (5):
staging:iio fill in some missing docs staging:iio:accel:lis3l02dq add symmetry to check for presence of
trigger.
staging:iio: use spi->irq valid rather than querying available modes staging:iio:adc:max1363 fix missing update_scan_mask callback. staging:iio:iio_core.h make less dependent on other included headers
drivers/staging/iio/accel/lis3l02dq_core.c | 2 +- drivers/staging/iio/adc/max1363_core.c | 1 + drivers/staging/iio/iio.h | 2 ++ drivers/staging/iio/iio_core.h | 6 ++++++ drivers/staging/iio/imu/adis16400_core.c | 2 +- drivers/staging/iio/meter/ade7758_core.c | 2 +- 6 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.2
Jonathan Cameron
maintainerPATCH 1/5 staging:iio fill in some missing docs
--- drivers/staging/iio/iio.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/iio/iio.h +2 -0
@@ -331,6 +331,8 @@ struct iio_buffer_setup_ops {* @name: [DRIVER] name of the device. * @info: [DRIVER] callbacks and constant info from driver * @info_exist_lock: [INTERN] lock to prevent use during removal +* @setup_ops: [DRIVER] callbacks to call before and after buffer +* enable/disable * @chrdev: [INTERN] associated character device * @groups: [INTERN] attribute groups * @groupcounter: [INTERN] index of next attribute group
Signature · 1 line
1.7.9.2
Jonathan Cameron
maintainerPATCH 3/5 staging:iio: use spi->irq valid rather than querying available modes
In reply to Jonathan CameronGiven these drivers only try to add the trigger if a valid irq is present it is clearer to check the same condition when deciding whether to remove it on a later trigger.
--- drivers/staging/iio/imu/adis16400_core.c | 2 +- drivers/staging/iio/meter/ade7758_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/iio/imu/adis16400_core.c +1 -1
@@ -1172,7 +1172,7 @@ static int __devinit adis16400_probe(struct spi_device *spi)return 0 ; error_remove_trigger: -if (indio_dev->modes &INDIO_BUFFER_TRIGGERED ) +if (spi->irq)adis16400_remove_trigger (indio_dev); error_uninitialize_ring:iio_buffer_unregister (indio_dev);
drivers/staging/iio/meter/ade7758_core.c +1 -1
@@ -800,7 +800,7 @@ static int __devinit ade7758_probe(struct spi_device *spi)return 0 ; error_remove_trigger: -if (indio_dev->modes &INDIO_BUFFER_TRIGGERED ) +if (spi->irq)ade7758_remove_trigger (indio_dev); error_uninitialize_ring:ade7758_uninitialize_ring (indio_dev);
Signature · 1 line
1.7.9.2
Jonathan Cameron
maintainerPATCH 4/5 staging:iio:adc:max1363 fix missing update_scan_mask callback.
In reply to Jonathan CameronWhen moving over to the new sw_ring_preenable I managed to add this callback to only one of the two iio_info structures. As such only some devices will currently work.
--- drivers/staging/iio/adc/max1363_core.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/iio/adc/max1363_core.c +1 -0
@@ -831,6 +831,7 @@ static struct attribute_group max1363_event_attribute_group = {static const struct iio_info max1238_info = { .read_raw = &max1363_read_raw, .driver_module =THIS_MODULE , + .update_scan_mode = &max1363_update_scan_mode, };static const struct iio_info max1363_info = {
Signature · 1 line
1.7.9.2
Jonathan Cameron
maintainerPATCH 5/5 staging:iio:iio_core.h make less dependent on other included headers
In reply to Jonathan CameronThere are a lot of pointers to structures used in here that are not declared unless a particular header is included first. Deal with the IIO specific ones by putting in forward declarations and the other ones by including kernel.h and device.h.
--- drivers/staging/iio/iio_core.h | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/staging/iio/iio_core.h +6 -0
@@ -12,6 +12,12 @@#ifndef _IIO_CORE_H_#define _IIO_CORE_H_ +#include <linux/kernel.h> +#include <linux/device.h> + +struct iio_chan_spec ; +struct iio_dev ; + int __iio_add_chan_devattr(const char *postfix, struct iio_chan_spec const *chan,
Signature · 1 line
1.7.9.2