Skip to content

Commit 948d8f2

Browse files
nunojsagregkh
authored andcommitted
iio: adis: do not disabe IRQs in 'adis_init()'
[ Upstream commit b600bd7 ] With commit ecb010d ("iio: imu: adis: Refactor adis_initial_startup") we are doing a HW or SW reset to the device which means that we'll get the default state of the data ready pin (which is enabled). Hence there's no point in disabling the IRQ in the init function. Moreover, this function is intended to initialize internal data structures and not really do anything on the device. As a result of this, some devices were left with the data ready pin enabled after probe which was not the desired behavior. Thus, we move the call to 'adis_enable_irq()' to the initial startup function where it makes more sense for it to be. Note that for devices that cannot mask/unmask the pin, it makes no sense to call the function at this point since the IRQ should not have been yet requested. This will be improved in a follow up change. Fixes: ecb010d ("iio: imu: adis: Refactor adis_initial_startup") Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20210903141423.517028-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent c8e5edc commit 948d8f2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/iio/imu/adis.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,8 @@ int __adis_initial_startup(struct adis *adis)
434434
if (ret)
435435
return ret;
436436

437+
adis_enable_irq(adis, false);
438+
437439
if (!adis->data->prod_id_reg)
438440
return 0;
439441

@@ -530,7 +532,7 @@ int adis_init(struct adis *adis, struct iio_dev *indio_dev,
530532
adis->current_page = 0;
531533
}
532534

533-
return adis_enable_irq(adis, false);
535+
return 0;
534536
}
535537
EXPORT_SYMBOL_GPL(adis_init);
536538

0 commit comments

Comments
 (0)