summaryrefslogtreecommitdiff
path: root/driver/temp_sensor
diff options
context:
space:
mode:
authorZick Wei <zick.wei@quanta.corp-partner.google.com>2020-05-25 11:00:43 +0800
committerCommit Bot <commit-bot@chromium.org>2020-05-28 04:46:06 +0000
commitf6424dd187d7123c90f4d7a16d08e4ca01370694 (patch)
tree41e060f24d195bd4823ad40ce13450931cb3684a /driver/temp_sensor
parent8a7666863b51b8dc7cc1be467cd9c41c3dd5e932 (diff)
downloadchrome-ec-f6424dd187d7123c90f4d7a16d08e4ca01370694.tar.gz
driver/temp_sensor: fix tmp432 compile issue
temp sensor tmp432 will compiler fail when board define CONFIG_TEMP_SENSOR_POWER_GPIO. BUG=b:154189125 BRANCH=none TEST=make buildall Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I3037a6a114b39568a42bbe2bf1f4da99a30d2044 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2214448 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Diffstat (limited to 'driver/temp_sensor')
-rw-r--r--driver/temp_sensor/tmp432.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/temp_sensor/tmp432.c b/driver/temp_sensor/tmp432.c
index 9f76e74660..6260678dcd 100644
--- a/driver/temp_sensor/tmp432.c
+++ b/driver/temp_sensor/tmp432.c
@@ -16,7 +16,9 @@
static int temp_val_local;
static int temp_val_remote1;
static int temp_val_remote2;
+#ifndef CONFIG_TEMP_SENSOR_POWER_GPIO
static uint8_t is_sensor_shutdown;
+#endif
static int fake_temp[TMP432_IDX_COUNT] = {-1, -1, -1};
/**
@@ -90,6 +92,7 @@ int tmp432_get_val(int idx, int *temp_ptr)
return EC_SUCCESS;
}
+#ifndef CONFIG_TEMP_SENSOR_POWER_GPIO
static int tmp432_shutdown(uint8_t want_shutdown)
{
int ret, value;
@@ -119,6 +122,7 @@ static int tmp432_shutdown(uint8_t want_shutdown)
is_sensor_shutdown = want_shutdown;
return ret;
}
+#endif
static int tmp432_set_therm_mode(void)
{