Linux Input/HID development
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	"Limonciello, Mario" <mario.limonciello@amd.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux ACPI <linux-acpi@vger.kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-input <linux-input@vger.kernel.org>,
	"rrangel@chromium.org" <rrangel@chromium.org>,
	Kai-Heng Feng <kai.heng.feng@canonical.com>
Subject: Re: [PATCH] i2c: ACPI: Do not check ACPI_FADT_LOW_POWER_S0
Date: Fri, 5 Aug 2022 20:54:45 +0200	[thread overview]
Message-ID: <a2d2b61e-87c0-ee39-ea4e-3c575da0a66c@redhat.com> (raw)
In-Reply-To: <CAJZ5v0ie7B=GvhbfBsi7Zxu+=YzYKUqvUNs6dNZQfT3CRm=KPg@mail.gmail.com>

Hi,

On 8/5/22 19:08, Rafael J. Wysocki wrote:
> On Fri, Aug 5, 2022 at 6:59 PM Limonciello, Mario
> <mario.limonciello@amd.com> wrote:
>>
>> On 8/5/2022 11:51, Rafael J. Wysocki wrote:
>>> 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>
>>
>> +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.

Re-reading the original thread:
https://lkml.kernel.org/lkml/20211220163823.1.Ie20ca47a26d3ea68124d8197b67bb1344c67f650@changeid/T/#u

The conclusion there was that the :

                 device_set_wakeup_capable(dev, true);
                 device_set_wakeup_enable(dev, false);

Calls should be made conditional on the IRQ being
marked ExclusiveAndWake instead of the ACPI_FADT_LOW_POWER_S0
check.

Regards,

Hans


  reply	other threads:[~2022-08-05 18:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a2d2b61e-87c0-ee39-ea4e-3c575da0a66c@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rafael@kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rrangel@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox