Skip to content

Commit 7d2b8e6

Browse files
commodojic23
authored andcommitted
staging: iio: ad5933: switch buffer mode to software
Since commit 152a6a8 ("staging:iio:accel:sca3000 move to hybrid hard / soft buffer design.") the buffer mechanism has changed and the INDIO_BUFFER_HARDWARE flag has been unused. Since commit 2d6ca60 ("iio: Add a DMAengine framework based buffer") the INDIO_BUFFER_HARDWARE flag has been re-purposed for DMA buffers. This driver has lagged behind these changes, and in order for buffers to work, the INDIO_BUFFER_SOFTWARE needs to be used. Signed-off-by: Alexandru Ardelean <[email protected]> Fixes: 2d6ca60 ("iio: Add a DMAengine framework based buffer") Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent a3b5655 commit 7d2b8e6

File tree

1 file changed

+1
-3
lines changed
  • drivers/staging/iio/impedance-analyzer

1 file changed

+1
-3
lines changed

drivers/staging/iio/impedance-analyzer/ad5933.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -648,8 +648,6 @@ static int ad5933_register_ring_funcs_and_init(struct iio_dev *indio_dev)
648648
/* Ring buffer functions - here trigger setup related */
649649
indio_dev->setup_ops = &ad5933_ring_setup_ops;
650650

651-
indio_dev->modes |= INDIO_BUFFER_HARDWARE;
652-
653651
return 0;
654652
}
655653

@@ -762,7 +760,7 @@ static int ad5933_probe(struct i2c_client *client,
762760
indio_dev->dev.parent = &client->dev;
763761
indio_dev->info = &ad5933_info;
764762
indio_dev->name = id->name;
765-
indio_dev->modes = INDIO_DIRECT_MODE;
763+
indio_dev->modes = (INDIO_BUFFER_SOFTWARE | INDIO_DIRECT_MODE);
766764
indio_dev->channels = ad5933_channels;
767765
indio_dev->num_channels = ARRAY_SIZE(ad5933_channels);
768766

0 commit comments

Comments
 (0)