]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Input: iqs5xx - allow device to be a wake-up source
authorJeff LaBundy <jeff@labundy.com>
Mon, 25 Jan 2021 04:44:26 +0000 (20:44 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 25 Jan 2021 04:49:12 +0000 (20:49 -0800)
Avoid placing the device in suspend mode (from which it cannot
generate interrupts) if it is defined as a wake-up source. The
device is still permitted to enter a low-power sensing mode on
its own.

Signed-off-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/1611002626-5889-11-git-send-email-jeff@labundy.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/iqs5xx.c

index b5287301a2937080ba27235c3893f491d6a5e412..05e0c6ff217b4e8f02c44ca3a47c6bd5278e92bb 100644 (file)
@@ -985,7 +985,7 @@ static int __maybe_unused iqs5xx_suspend(struct device *dev)
        struct input_dev *input = iqs5xx->input;
        int error = 0;
 
-       if (!input)
+       if (!input || device_may_wakeup(dev))
                return error;
 
        mutex_lock(&input->mutex);
@@ -1004,7 +1004,7 @@ static int __maybe_unused iqs5xx_resume(struct device *dev)
        struct input_dev *input = iqs5xx->input;
        int error = 0;
 
-       if (!input)
+       if (!input || device_may_wakeup(dev))
                return error;
 
        mutex_lock(&input->mutex);