Patch "Input: atmel_mxt_ts - disable IRQ across suspend" has been added to the 4.9-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

    Input: atmel_mxt_ts - disable IRQ across suspend

to the 4.9-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:
     input-atmel_mxt_ts-disable-irq-across-suspend.patch
and it can be found in the queue-4.9 subdirectory.

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



commit caddbc52a3cc547de2996df53420af69623308f2
Author: Evan Green <evgreen@xxxxxxxxxxxx>
Date:   Wed Oct 2 14:00:21 2019 -0700

    Input: atmel_mxt_ts - disable IRQ across suspend
    
    [ Upstream commit 463fa44eec2fef50d111ed0199cf593235065c04 ]
    
    Across suspend and resume, we are seeing error messages like the following:
    
    atmel_mxt_ts i2c-PRP0001:00: __mxt_read_reg: i2c transfer failed (-121)
    atmel_mxt_ts i2c-PRP0001:00: Failed to read T44 and T5 (-121)
    
    This occurs because the driver leaves its IRQ enabled. Upon resume, there
    is an IRQ pending, but the interrupt is serviced before both the driver and
    the underlying I2C bus have been resumed. This causes EREMOTEIO errors.
    
    Disable the IRQ in suspend, and re-enable it on resume. If there are cases
    where the driver enters suspend with interrupts disabled, that's a bug we
    should fix separately.
    
    Signed-off-by: Evan Green <evgreen@xxxxxxxxxxxx>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index c2fb0236a47c..8d871fcb7912 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -3206,6 +3206,8 @@ static int __maybe_unused mxt_suspend(struct device *dev)
 
 	mutex_unlock(&input_dev->mutex);
 
+	disable_irq(data->irq);
+
 	return 0;
 }
 
@@ -3218,6 +3220,8 @@ static int __maybe_unused mxt_resume(struct device *dev)
 	if (!input_dev)
 		return 0;
 
+	enable_irq(data->irq);
+
 	mutex_lock(&input_dev->mutex);
 
 	if (input_dev->users)



[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