ring->setup_ops = &adis16201_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, ADIS16201_SCAN_SUPPLY);
- iio_scan_mask_set(ring, ADIS16201_SCAN_ACC_X);
- iio_scan_mask_set(ring, ADIS16201_SCAN_ACC_Y);
- iio_scan_mask_set(ring, ADIS16201_SCAN_AUX_ADC);
- iio_scan_mask_set(ring, ADIS16201_SCAN_TEMP);
- iio_scan_mask_set(ring, ADIS16201_SCAN_INCLI_X);
- iio_scan_mask_set(ring, ADIS16201_SCAN_INCLI_Y);
-
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16201_trigger_handler,
IRQF_ONESHOT,
ring->setup_ops = &adis16203_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, ADIS16203_SCAN_SUPPLY);
- iio_scan_mask_set(ring, ADIS16203_SCAN_TEMP);
- iio_scan_mask_set(ring, ADIS16203_SCAN_AUX_ADC);
- iio_scan_mask_set(ring, ADIS16203_SCAN_INCLI_X);
- iio_scan_mask_set(ring, ADIS16203_SCAN_INCLI_Y);
-
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16203_trigger_handler,
IRQF_ONESHOT,
ring->setup_ops = &adis16204_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, ADIS16204_SCAN_SUPPLY);
- iio_scan_mask_set(ring, ADIS16204_SCAN_ACC_X);
- iio_scan_mask_set(ring, ADIS16204_SCAN_ACC_Y);
- iio_scan_mask_set(ring, ADIS16204_SCAN_AUX_ADC);
- iio_scan_mask_set(ring, ADIS16204_SCAN_TEMP);
-
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16204_trigger_handler,
IRQF_ONESHOT,
ring->setup_ops = &adis16209_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, ADIS16209_SCAN_SUPPLY);
- iio_scan_mask_set(ring, ADIS16209_SCAN_ACC_X);
- iio_scan_mask_set(ring, ADIS16209_SCAN_ACC_Y);
- iio_scan_mask_set(ring, ADIS16209_SCAN_AUX_ADC);
- iio_scan_mask_set(ring, ADIS16209_SCAN_TEMP);
- iio_scan_mask_set(ring, ADIS16209_SCAN_INCLI_X);
- iio_scan_mask_set(ring, ADIS16209_SCAN_INCLI_Y);
- iio_scan_mask_set(ring, ADIS16209_SCAN_ROT);
-
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16209_trigger_handler,
IRQF_ONESHOT,
ring->setup_ops = &adis16240_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, ADIS16240_SCAN_SUPPLY);
- iio_scan_mask_set(ring, ADIS16240_SCAN_ACC_X);
- iio_scan_mask_set(ring, ADIS16240_SCAN_ACC_Y);
- iio_scan_mask_set(ring, ADIS16240_SCAN_ACC_Z);
- iio_scan_mask_set(ring, ADIS16240_SCAN_AUX_ADC);
- iio_scan_mask_set(ring, ADIS16240_SCAN_TEMP);
-
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16240_trigger_handler,
IRQF_ONESHOT,
ring->setup_ops = &lis3l02dq_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, 0);
- iio_scan_mask_set(ring, 1);
- iio_scan_mask_set(ring, 2);
-
/* Functions are NULL as we set handler below */
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&lis3l02dq_trigger_handler,
ARRAY_SIZE(sca3000_channels));
if (ret < 0)
goto error_unregister_dev;
+ if (indio_dev->ring) {
+ iio_scan_mask_set(indio_dev->ring, 0);
+ iio_scan_mask_set(indio_dev->ring, 1);
+ iio_scan_mask_set(indio_dev->ring, 2);
+ }
+
if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) {
ret = request_threaded_irq(spi->irq,
NULL,
indio_dev->ring->access = &sca3000_ring_access_funcs;
- iio_scan_mask_set(indio_dev->ring, 0);
- iio_scan_mask_set(indio_dev->ring, 1);
- iio_scan_mask_set(indio_dev->ring, 2);
-
return 0;
}
printk(KERN_ERR "failed to initialize the ring\n");
goto error_unreg_ring_funcs;
}
-
+ if (indio_dev->ring) {
+ /* Set default scan mode */
+ iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_SUPPLY);
+ iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_GYRO);
+ iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_AUX_ADC);
+ iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_TEMP);
+ iio_scan_mask_set(indio_dev->ring, ADIS16260_SCAN_ANGL);
+ }
if (spi->irq) {
ret = adis16260_probe_trigger(indio_dev);
if (ret)
ring->setup_ops = &adis16260_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- iio_scan_mask_set(ring, ADIS16260_SCAN_SUPPLY);
- iio_scan_mask_set(ring, ADIS16260_SCAN_GYRO);
- iio_scan_mask_set(ring, ADIS16260_SCAN_AUX_ADC);
- iio_scan_mask_set(ring, ADIS16260_SCAN_TEMP);
- iio_scan_mask_set(ring, ADIS16260_SCAN_ANGL);
-
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16260_trigger_handler,
IRQF_ONESHOT,
ring->scan_timestamp = true;
ring->setup_ops = &adis16400_ring_setup_ops;
ring->owner = THIS_MODULE;
- /* Set default scan mode */
- ring->scan_mask = st->variant->default_scan_mask;
- ring->scan_count = hweight_long(st->variant->default_scan_mask);
indio_dev->pollfunc = iio_alloc_pollfunc(&iio_pollfunc_store_time,
&adis16400_trigger_handler,