Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] i2c: ACPI: Do not check ACPI_FADT_LOW_POWER_S0
@ 2022-08-05 16:51 Rafael J. Wysocki
  2022-08-05 16:59 ` Limonciello, Mario
  0 siblings, 1 reply; 8+ messages in thread
From: Rafael J. Wysocki @ 2022-08-05 16:51 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Benjamin Tissoires, LKML, Linux ACPI, Mika Westerberg,
	linux-input, Mario Limonciello

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

The ACPI_FADT_LOW_POWER_S0 flag merely means that it is better to
use low-power S0 idle on the given platform than S3 (provided that
the latter is supported) and it doesn't preclude using either of
them (which of them will be used depends on the choices made by user
space).

Because of that, ACPI_FADT_LOW_POWER_S0 is generally not sufficient
for making decisions in device drivers and so i2c_hid_acpi_probe()
should not use it.

Moreover, Linux always supports suspend-to-idle, so if a given
device can wake up the system from suspend-to-idle, then it can be
marked as wakeup capable unconditionally, so make that happen in
i2c_hid_acpi_probe().

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/hid/i2c-hid/i2c-hid-acpi.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Index: linux-pm/drivers/hid/i2c-hid/i2c-hid-acpi.c
===================================================================
--- linux-pm.orig/drivers/hid/i2c-hid/i2c-hid-acpi.c
+++ linux-pm/drivers/hid/i2c-hid/i2c-hid-acpi.c
@@ -105,10 +105,8 @@ static int i2c_hid_acpi_probe(struct i2c
 
 	acpi_device_fix_up_power(adev);
 
-	if (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) {
-		device_set_wakeup_capable(dev, true);
-		device_set_wakeup_enable(dev, false);
-	}
+	device_set_wakeup_capable(dev, true);
+	device_set_wakeup_enable(dev, false);
 
 	return i2c_hid_core_probe(client, &ihid_acpi->ops,
 				  hid_descriptor_address, 0);




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-30 17:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-05 16:51 [PATCH] i2c: ACPI: Do not check ACPI_FADT_LOW_POWER_S0 Rafael J. Wysocki
2022-08-05 16:59 ` Limonciello, Mario
2022-08-05 17:08   ` Rafael J. Wysocki
2022-08-05 18:54     ` Hans de Goede
2022-08-06  2:19       ` Raul Rangel
2022-08-08 17:10         ` Rafael J. Wysocki
2022-08-26 21:48           ` Raul Rangel
2022-08-30 17:10             ` Raul Rangel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox