[PATCH 7/8] HID: i2c-hid: Don't set wake_irq when using ACPI

Raul E Rangel
2022-08-30T23:17:14Z

The i2c-core will now handle setting the wake_irq for ACPI systems.

I didn't delete the whole block since this also covers systems that
don't use ACPI or DT, but I'm honestly not sure if that's a valid
config.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
---

drivers/hid/i2c-hid/i2c-hid-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 0b7a1a8b3e9a33..630e8dcda1100d 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -1037,10 +1037,10 @@ int i2c_hid_core_probe(struct i2c_client *client, struct i2chid_ops *ops,
goto err_powered;

/*
- * Systems using device tree should set up wakeup via DTS,
+ * Systems using device tree should set up wakeup via DTS or ACPI,
* the rest will configure device as wakeup source by default.
*/
- if (!client->dev.of_node) {
+ if (!client->dev.of_node && !has_acpi_companion(&client->dev)) {
device_init_wakeup(&client->dev, true);
dev_pm_set_wake_irq(&client->dev, client->irq);
}
--
2.37.2.672.g94769d06f0-goog