Patch "iio: adis: do not disabe IRQs in 'adis_init()'" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iio: adis: do not disabe IRQs in 'adis_init()'

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-adis-do-not-disabe-irqs-in-adis_init.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 183e3237230c795ed20146bb0da0dbec3d82c590
Author: Nuno Sá <nuno.sa@xxxxxxxxxx>
Date:   Fri Sep 3 16:14:19 2021 +0200

    iio: adis: do not disabe IRQs in 'adis_init()'
    
    [ Upstream commit b600bd7eb333554518b4dd36b882b2ae58a5149e ]
    
    With commit ecb010d441088 ("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: ecb010d441088 ("iio: imu: adis: Refactor adis_initial_startup")
    Signed-off-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210903141423.517028-2-nuno.sa@xxxxxxxxxx
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index f8b7837d8b8f6..715eef81bc248 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -434,6 +434,8 @@ int __adis_initial_startup(struct adis *adis)
 	if (ret)
 		return ret;
 
+	adis_enable_irq(adis, false);
+
 	if (!adis->data->prod_id_reg)
 		return 0;
 
@@ -530,7 +532,7 @@ int adis_init(struct adis *adis, struct iio_dev *indio_dev,
 		adis->current_page = 0;
 	}
 
-	return adis_enable_irq(adis, false);
+	return 0;
 }
 EXPORT_SYMBOL_GPL(adis_init);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux