From: Hans de Goede <hdegoede@redhat.com>
To: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, linux-input@vger.kernel.org
Subject: [PATCH 4/4] HID: multitouch: Disable event reporting on suspend when the device is not a wakeup-source
Date: Sat, 29 May 2021 17:14:24 +0200 [thread overview]
Message-ID: <20210529151424.12212-5-hdegoede@redhat.com> (raw)
In-Reply-To: <20210529151424.12212-1-hdegoede@redhat.com>
Disable event reporting on suspend when the hid device is not
a wakeup-source. This should help save some extra power in this case.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/hid/hid-multitouch.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index cfb68e443ddd..c5a7523f97ac 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -1764,7 +1764,8 @@ static int mt_suspend(struct hid_device *hdev, pm_message_t state)
struct mt_device *td = hid_get_drvdata(hdev);
/* High latency is desirable for power savings during S3/S0ix */
- if (td->mtclass.quirks & MT_QUIRK_DISABLE_WAKEUP)
+ if ((td->mtclass.quirks & MT_QUIRK_DISABLE_WAKEUP) ||
+ !hid_hw_may_wakeup(hdev))
mt_set_modes(hdev, HID_LATENCY_HIGH, false, false);
else
mt_set_modes(hdev, HID_LATENCY_HIGH, true, true);
--
2.31.1
prev parent reply other threads:[~2021-05-29 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-29 15:14 [PATCH 0/4] HID: multitouch: Disable event reporting on suspend when the device is not a wakeup-source Hans de Goede
2021-05-29 15:14 ` [PATCH 1/4] HID: core: Add hid_hw_may_wakeup() function Hans de Goede
2021-06-24 12:16 ` Benjamin Tissoires
2021-06-24 15:59 ` Hans de Goede
2021-06-25 12:03 ` Jiri Kosina
2021-05-29 15:14 ` [PATCH 2/4] HID: usbhid: Implement may_wakeup ll-driver callback Hans de Goede
2021-05-29 15:14 ` [PATCH 3/4] HID: logitech-dj: " Hans de Goede
2021-05-29 15:14 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210529151424.12212-5-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).