diff options
author | Ricardo Ribalda <ribalda@chromium.org> | 2022-11-14 13:20:34 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-11-14 20:46:31 +0100 |
commit | 79ece9b292af6b0edcfb4d67a00711d25507640b (patch) | |
tree | 4d0dcc707942df8af08e47ed761472370eb655dc /drivers/hid/intel-ish-hid | |
parent | 145900cf91c4b32ac05dbc8675a0c7f4a278749d (diff) | |
download | linux-79ece9b292af6b0edcfb4d67a00711d25507640b.tar.gz |
i2c: Restore initial power state if probe fails
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>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/hid/intel-ish-hid')
0 files changed, 0 insertions, 0 deletions