diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-20 15:25:47 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-12-03 20:40:25 +0100 |
commit | 01d37c8318d0e624e3df63b53e4c3efa0aecb187 (patch) | |
tree | 4668bd93b1513cb7fc281c2edf04a7d425a7dec7 /drivers/iio/gyro/adxrs290.c | |
parent | io:core: In iio_map_array_register() cleanup in case of error (diff) | |
download | linux-01d37c8318d0e624e3df63b53e4c3efa0aecb187.tar.xz linux-01d37c8318d0e624e3df63b53e4c3efa0aecb187.zip |
iio: Fix: Do not poll the driver again if try_reenable() callback returns non 0.
The original reason for this behaviour is long gone and no current
drivers are making use of this function correctly. Note however, that
you would be very unlucky to actually hit the problem as it would
require a bus comms failure in the callback.
This dates back a long way. The original board on which I did a lot
of early IIO development only supported edge interrupts, but some of the
sensors were level interrupt based. As such, the lis3l02dq driver did
a dance with checking a GPIO to identify if it should retrigger.
That was an unsustainable hack so we later just stopped supporting interrupts
for that particular combination.
There are a number of drivers where a fault on a bus read in the
try_reenable() callback will result in them returning non 0 and
incorrectly then causing iio_trigger_poll() to be called.
Anyhow, this handling is unused and causing issues so let us rip it out.
Link: https://lore.kernel.org/linux-iio/20200813075358.13310-1-lars@metafoo.de/
After this the try_reenable() naming makes no sense, so as a follow up
patch I'll rename it to simply reenable(). I haven't done that here
as it will add noise to the fix for backporting.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Christian Eggers <ceggers@arri.de>
Link: https://lore.kernel.org/r/20200920132548.196452-2-jic23@kernel.org
Diffstat (limited to 'drivers/iio/gyro/adxrs290.c')
0 files changed, 0 insertions, 0 deletions