Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp1932082rwb; Fri, 5 Aug 2022 10:06:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR7sGsiZNa1YtwKocZrC0/1KNdyM2alcsK1cHtkPLOqNwxpKMc6yd6MMBVy+KEMyCc8Zgjth X-Received: by 2002:a05:6402:4144:b0:431:6ef0:bef7 with SMTP id x4-20020a056402414400b004316ef0bef7mr7280853eda.151.1659719172784; Fri, 05 Aug 2022 10:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659719172; cv=none; d=google.com; s=arc-20160816; b=qTrHytXtrnH/nzf+6wOHknOAsyCSAITl5aiS4/PbOZ0ZV3Dvqv1C9neFLwh0fZ8sUe MO8K53UtH/JIPGd8nEY/RQycqAndA3D6InQgKznLPzo/JH26k7xu8HyLpSXPG97YTauH FZFOnnVQDk/Wfu+uWtqkxXtyExeNCoRUsAW/f0KMeR1DtH8vZUIT1N8CL071UGe7Z8Qp p068jPfvnQmEetOkPzILin4wboLxulrCuRjvqHygFSPUM/ebs+HBQ7XNITsWkDENRGOL gqSFWjLWjnUVLdyQh+7TTKX/7U0/c8EiO30u0C8IGHXgjS2HdC0vsQJNeRV/NQpQgCFA rVYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=JAtX7eliofQSDv8uLV66ASMpaH81U1+SwjIWLGRi2vA=; b=0cyKMOcMPvqkaMOHO74dulvQ2/EN0OU74W6QVAiTCTJ31g0sBekRkTkuTXOgxfLC+C MMGOe+ctop2DU12aR9Ia3VblxD++L+hO8llRUu4VBhpwD9+nYKQ88t/Xn+wU+X37uOzl X5qdTSbqMUXoIEGROR4P0K1GjjNZsSS/X0N8f3+fKYVMs+wKLoIupWUn9l5TlxJvARv5 7y/CFo0CN9DO9oj13vXJeilUzER/NW5mYCtwKGDegc4vMJJdnE6N6x/JA5E1pQhEZ6Hj mf58/3K2W1lv5WgOSGSW/sQFSsG80qengBoj+gg7vpfmpH4xj7AlYG8dvN1IZX3LEmtN EKPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a1-20020a1709063e8100b0072eece129bdsi3845472ejj.59.2022.08.05.10.05.47; Fri, 05 Aug 2022 10:06:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241338AbiHEQwK (ORCPT + 99 others); Fri, 5 Aug 2022 12:52:10 -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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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);