Skip to content

Commit 41e7074

Browse files
dumitruceclannunojsa
authored andcommitted
iio: adc: ad_sigma_delta: fix buffered mode irq
Buffered mode using ad_sigma_delta is not functional as the IRQ is not enabled in the postenable callback for devices that are not using spi_engine (INDIO_BUFFER_HARDWARE mode). Comparing to the 2022_R2 version, it seems that the condition should have been negated. Fix by checking inequality instead of equality to INDIO_BUFFER_HARDWARE. Fixes: 27b588f ("Merge tag 'xilinx-v2023.1' of https://github.com/Xilinx/linux-xlnx.git") Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
1 parent 352cca2 commit 41e7074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ad_sigma_delta.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ static int ad_sd_buffer_postenable(struct iio_dev *indio_dev)
450450
* Differs from upstream because of the spi engine support and we want to enable
451451
* the irq only after setting AD_SD_MODE_CONTINUOUS (as in the upstream lib)
452452
*/
453-
if (iio_device_get_current_mode(indio_dev) == INDIO_BUFFER_HARDWARE) {
453+
if (iio_device_get_current_mode(indio_dev) != INDIO_BUFFER_HARDWARE) {
454454
sigma_delta->irq_dis = false;
455455
enable_irq(sigma_delta->irq_line);
456456
}

0 commit comments

Comments
 (0)