From patchwork Fri Aug 5 16:51:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 596456 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5349EC25B08 for ; Fri, 5 Aug 2022 16:52:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241361AbiHEQwI (ORCPT ); Fri, 5 Aug 2022 12:52:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241270AbiHEQvw (ORCPT ); Fri, 5 Aug 2022 12:51:52 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 852757B784; Fri, 5 Aug 2022 09:51:27 -0700 (PDT) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.0.0) id 008ce5cc8209cc32; Fri, 5 Aug 2022 18:51:18 +0200 Received: from kreacher.localnet (public-gprs522492.centertel.pl [31.61.160.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 91B5366CECD; Fri, 5 Aug 2022 18:51:17 +0200 (CEST) From: "Rafael J. Wysocki" To: Jiri Kosina Cc: Benjamin Tissoires , LKML , Linux ACPI , Mika Westerberg , linux-input@vger.kernel.org, Mario Limonciello Subject: [PATCH] i2c: ACPI: Do not check ACPI_FADT_LOW_POWER_S0 Date: Fri, 05 Aug 2022 18:51:11 +0200 Message-ID: <12042830.O9o76ZdvQC@kreacher> MIME-Version: 1.0 X-CLIENT-IP: 31.61.160.61 X-CLIENT-HOSTNAME: public-gprs522492.centertel.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdefuddguddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeffffffkefgheehffelteeiveeffeevhfelteejvddvieejjeelvdeiheeuveeuffenucfkphepfedurdeiuddrudeitddriedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepfedurdeiuddrudeitddriedupdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeejpdhrtghpthhtohepjhhikhhosheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepsggvnhhjrghmihhnrdhtihhsshhoihhrvghssehrvgguhhgrthdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehmihhk rgdrfigvshhtvghrsggvrhhgsehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqihhnphhuthesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehmrghrihhordhlihhmohhntghivghllhhosegrmhgurdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=7 Fuz1=7 Fuz2=7 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Rafael J. Wysocki 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 --- 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);