Input: iqs5xx - allow device to be a wake-up source
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>
This commit is contained in:
parent
8e6a8b0c9f
commit
ce996aa30e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user