Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp1956294rwb; Fri, 5 Aug 2022 10:29:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR4hqqsnCIKBHlnzru0KU2padzQ2S+xjINLa2lXRZnhbMsC2w2dSu0WoZEAUyDlvFy9L5SqU X-Received: by 2002:a63:1b13:0:b0:41a:6481:56e0 with SMTP id b19-20020a631b13000000b0041a648156e0mr6564060pgb.5.1659720593649; Fri, 05 Aug 2022 10:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659720593; cv=none; d=google.com; s=arc-20160816; b=MJ4pub/5HAzWiVfYPRTq4z7YCI6f2ry9VUS63poNjC/c6YwrhC4SBtxTHBYDPWiI1a V64AarkmkLrt8GSVy1BWGtj6dfG/DVOy0u978guosRn+zaDy2nQVQPVxAyT87hgrC6/U WA4fbbP2+B9YwrpghrWJOusiQMnAY5AT5xaLS1nxBhKtSbzMQbIclJrwGd48tlak12Yz GGR+TRvUZ16oCQ1vak9yQRvwrFoPhTdQCZbBk9kqrf2q7uQRlqXDJuo+tpuIrK7HWkLp ZHGFXMoWFBFiuriMPNGSZ/9SklOcJTYUCVTppvahXxnTt6Q7nCyOmQnJFaQgTMiFTGRK G8EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=0hkyQR/P6tkKTyA1L+y5V9deL6+UATBvdrUuSMJew0U=; b=A6mmEVHFFWc5dD9zBqUu0WAqJC6DAy97KD4t+NHMe2/+8nkORCfhoQ+eVcYymSVwG0 OPBW32kmm77C738oI1Ub0l4PQojwRRCmFZsmDhwW7ggeLI39PDs31hNBcqkN3+/on7W5 Qo/xySdva51AAMzdZiNadkLfHx2Z6vT4gyprDkKz3QCPjIbKBoKJHbFmclWgt+o0IRbH 0cWJYYJFfZ23af2x9kB4VKQzL0rrnNo1DsIO2HOmO+uj42Uf89shDiqs4Fth1iPUiM3q AK6TIX+TPflfSq0tkilwIznC3lAJIa0jv/Q2yWvkIq2CV6cZ63E+gr4D7U2AzkNm40fk uAdQ== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a17090a408700b001e895fed1e2si7657169pjg.130.2022.08.05.10.29.39; Fri, 05 Aug 2022 10:29:53 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238673AbiHERIV (ORCPT + 99 others); Fri, 5 Aug 2022 13:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231585AbiHERIU (ORCPT ); Fri, 5 Aug 2022 13:08:20 -0400 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC60D3CBCB; Fri, 5 Aug 2022 10:08:17 -0700 (PDT) Received: by mail-yb1-f179.google.com with SMTP id 123so4710825ybv.7; Fri, 05 Aug 2022 10:08:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=0hkyQR/P6tkKTyA1L+y5V9deL6+UATBvdrUuSMJew0U=; b=8JRd/lkrCOu3hRP4RzSuDivhE38TXq185YM6hGTGEdAKl/EzM1vrCb0rUtti+0L6KG EUdRvmbb0t51trSqer8aqEaM+Gx2E5PWrkZqBMHBlVKDiCRMuWtfhkPjj/seHExoWSu8 AhU+413wp9Zz7Y8B1yDNMib3bzx86VwuG5wrMMHgQO0FNSxBWW5gd8HU10jkbL9RPyuM Ql5VBJf6cLwHWldt4TtSpjDeQIgZg4ejQMZHF+3feCSxm26M6CXkXofnEoIdTFHQAocc fzLOZBDcE9D3f2atpARxEB4mNizgIXJFV8J1xysEKMZYdvMeV+h/ir2kbIJNZiDCjXG1 mFaQ== X-Gm-Message-State: ACgBeo3wjCMHFPGtfVUZysC7Ls8/OP+oHi22gkazZZpattgWWG4V+2Nj Fh/IbF3bqSFPCDaIn2cq8FRfI62YW8f+B9kBfOg= X-Received: by 2002:a5b:40a:0:b0:677:a43b:dcd3 with SMTP id m10-20020a5b040a000000b00677a43bdcd3mr5716170ybp.622.1659719296723; Fri, 05 Aug 2022 10:08:16 -0700 (PDT) MIME-Version: 1.0 References: <12042830.O9o76ZdvQC@kreacher> <1c7fa65d-47ab-b064-9087-648bcfbf4ab5@amd.com> In-Reply-To: <1c7fa65d-47ab-b064-9087-648bcfbf4ab5@amd.com> From: "Rafael J. Wysocki" Date: Fri, 5 Aug 2022 19:08:05 +0200 Message-ID: Subject: Re: [PATCH] i2c: ACPI: Do not check ACPI_FADT_LOW_POWER_S0 To: "Limonciello, Mario" Cc: "Rafael J. Wysocki" , Jiri Kosina , Benjamin Tissoires , LKML , Linux ACPI , Mika Westerberg , linux-input , "rrangel@chromium.org" , Hans de Goede , Kai-Heng Feng Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Fri, Aug 5, 2022 at 6:59 PM Limonciello, Mario wrote: > > On 8/5/2022 11:51, Rafael J. Wysocki wrote: > > 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 > > +Raul > +Hans > +KH > > Raul had a patch that was actually going to just tear out this code > entirely: > https://lkml.kernel.org/lkml/20211220163823.1.Ie20ca47a26d3ea68124d8197b67bb1344c67f650@changeid/ > > As part of that patch series discussion another suggestion had > transpired > (https://patchwork.kernel.org/project/linux-input/patch/20211220163823.2.Id022caf53d01112188308520915798f08a33cd3e@changeid/#24681016): > > ``` > if ((acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) && > !adev->flags.power_manageable) { > device_set_wakeup_capable(dev, true); > device_set_wakeup_enable(dev, false); > } > ``` > > If this is being changed, maybe consider that suggestion to > check `adev->flags.power_manageable`. Fair enough, I'll send a v2 with this check added.