lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 18 May 2020 17:35:10 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     jikos@...nel.org, benjamin.tissoires@...hat.com
Cc:     Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Hans de Goede <hdegoede@...hat.com>,
        Aaron Ma <aaron.ma@...onical.com>,
        HungNien Chen <hn.chen@...dahitech.com>,
        Pavel Balan <admin@...ma.net>,
        Daniel Playfair Cal <daniel.playfair.cal@...il.com>,
        You-Sheng Yang <vicamo.yang@...onical.com>,
        linux-input@...r.kernel.org (open list:HID CORE LAYER),
        linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] HID: i2c-hid: Enable touchpad wakeup from Suspend-to-Idle

Many laptops have the ability to be woken up from Suspend-to-Idle by
touchpad. This is also the default behavior on other OSes.

So let's enable the wakeup support if the system defaults to use
Suspend-to-Idle.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
---
 drivers/hid/i2c-hid/i2c-hid-core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 294c84e136d7..cac82971a668 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -1072,6 +1072,11 @@ static int i2c_hid_probe(struct i2c_client *client,
 
 	i2c_hid_acpi_fix_up_power(&client->dev);
 
+	if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
+		device_set_wakeup_capable(&client->dev, true);
+		device_wakeup_enable(&client->dev);
+	}
+
 	device_enable_async_suspend(&client->dev);
 
 	/* Make sure there is something at this address */
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ