Message ID | 1611002626-5889-11-git-send-email-jeff@labundy.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ce996aa30ef1d20bb8c84aa78087bb07b4745317 |
Headers | show |
Series | input: iqs5xx: Minor enhancements and optimizations | expand |
On Mon, Jan 18, 2021 at 02:43:46PM -0600, Jeff LaBundy wrote: > 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> Applied, thank you.
diff --git a/drivers/input/touchscreen/iqs5xx.c b/drivers/input/touchscreen/iqs5xx.c index dac132b..6c1bc6b 100644 --- a/drivers/input/touchscreen/iqs5xx.c +++ b/drivers/input/touchscreen/iqs5xx.c @@ -1001,7 +1001,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); @@ -1020,7 +1020,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);
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> --- drivers/input/touchscreen/iqs5xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)