From: Wolfram Sang <wsa@kernel.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Tomasz Figa <tfiga@chromium.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Hidenori Kobayashi <hidenorik@chromium.org>,
stable@vger.kernel.org,
Sergey Senozhatsky <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org,
Hidenori Kobayashi <hidenorik@google.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
linux-i2c@vger.kernel.org
Subject: Re: [PATCH v6 1/1] i2c: Restore initial power state if probe fails
Date: Mon, 14 Nov 2022 20:47:44 +0100 [thread overview]
Message-ID: <Y3KbYLSFLUuVnSIa@shikoro> (raw)
In-Reply-To: <20221109-i2c-waive-v6-1-bc059fb7e8fa@chromium.org>
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
wOn Mon, Nov 14, 2022 at 01:20:34PM +0100, Ricardo Ribalda wrote:
> A driver that supports I2C_DRV_ACPI_WAIVE_D0_PROBE is not expected to
> power off a device that it has not powered on previously.
>
> For devices operating in "full_power" mode, the first call to
> `i2c_acpi_waive_d0_probe` will return 0, which means that the device
> will be turned on with `dev_pm_domain_attach`.
>
> If probe fails the second call to `i2c_acpi_waive_d0_probe` will
> return 1, which means that the device will not be turned off.
> This is, it will be left in a different power state. Lets fix it.
>
> Reviewed-by: Hidenori Kobayashi <hidenorik@chromium.org>
> Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: stable@vger.kernel.org
> Fixes: b18c1ad685d9 ("i2c: Allow an ACPI driver to manage the device's power state during probe")
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2022-11-14 19:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 12:20 [PATCH v6 0/1] i2c: Restore power status of device if probe fails Ricardo Ribalda
2022-11-14 12:20 ` [PATCH v6 1/1] i2c: Restore initial power state " Ricardo Ribalda
2022-11-14 12:42 ` Mika Westerberg
2022-11-14 19:47 ` Wolfram Sang [this message]
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=Y3KbYLSFLUuVnSIa@shikoro \
--to=wsa@kernel.org \
--cc=hidenorik@chromium.org \
--cc=hidenorik@google.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=senozhatsky@chromium.org \
--cc=stable@vger.kernel.org \
--cc=tfiga@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