summaryrefslogtreecommitdiff
path: root/driver/temp_sensor
diff options
context:
space:
mode:
authorPeter Marheine <pmarheine@chromium.org>2022-06-02 11:34:57 +1000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-06-03 00:12:45 +0000
commitbcfa74e7197e543329e2d38e5b8c1daa602458e8 (patch)
tree543ab0bcf0737c90dc9861dc78c0856759f4e091 /driver/temp_sensor
parent4407d633fba8728f670b7b96b917d25a45bebbe5 (diff)
downloadchrome-ec-bcfa74e7197e543329e2d38e5b8c1daa602458e8.tar.gz
Replace power_get_state calls with chipset_in_state
The `power_get_state` function does not exist when using the Zephyr native power sequencing subsystem. Use the chipset_in_state family of functions instead, because those are available in either configuration. For PD power state change, this means S4 cannot be returned because chipset_in_state doesn't currently provide an option for S4 specifically. BUG=b:233681784 TEST=make buildall; zmake testall BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I14af373ec4473b0c19bf46ebae0c503e5139e114 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3685929 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Jameson Thies <jthies@google.com> Tested-by: Jameson Thies <jthies@google.com>
Diffstat (limited to 'driver/temp_sensor')
-rw-r--r--driver/temp_sensor/amd_r19me4070.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/temp_sensor/amd_r19me4070.c b/driver/temp_sensor/amd_r19me4070.c
index b331a1a3eb..b5f4e66d38 100644
--- a/driver/temp_sensor/amd_r19me4070.c
+++ b/driver/temp_sensor/amd_r19me4070.c
@@ -53,7 +53,7 @@ int get_temp_R19ME4070(int idx, int *temp_ptr)
* We shouldn't read the GPU temperature when the state
* is not in S0, because GPU is enabled in S0.
*/
- if ((power_get_state()) != POWER_S0) {
+ if (!chipset_in_state(CHIPSET_STATE_ON)) {
*temp_ptr = C_TO_K(0);
return EC_ERROR_BUSY;
}