summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Peress <peress@chromium.org>2021-03-05 12:15:45 -0700
committerCommit Bot <commit-bot@chromium.org>2021-03-05 21:52:26 +0000
commit2aa26934f47acfe1cf3c8f0f00f44f5ab32e3086 (patch)
treedfc24fa40e30365d2341314da24abac8dfa6a838
parent8676038c098e1cfb0d27bcd743164c924a853c31 (diff)
downloadchrome-ec-2aa26934f47acfe1cf3c8f0f00f44f5ab32e3086.tar.gz
zephyr: volteer: gpio: add CONFIG_TEMP_SENSOR_POWER_GPIO
Adding this config value makes sure that we check that the temp sensor is powered prior to trying to read it. Sample output: 21-03-05 12:03:45.732 uart:~$ temps 21-03-05 12:06:18.033 TEMP_SENSOR_CHARGER : Not powered 21-03-05 12:06:18.036 TEMP_SENSOR_PP3300_REGULATOR: Not powered 21-03-05 12:06:18.040 TEMP_SENSOR_DDR_SOC : Not powered 21-03-05 12:06:18.044 TEMP_SENSOR_FAN : Not powered BRANCH=none BUG=none TEST=build/flash volteer and run `temps` command Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ic9eb310815eb9733911a4580a8d5a63d7bdfaac9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2739709 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/projects/volteer/include/gpio_map.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/zephyr/projects/volteer/include/gpio_map.h b/zephyr/projects/volteer/include/gpio_map.h
index 29e962e867..0b2f33f86d 100644
--- a/zephyr/projects/volteer/include/gpio_map.h
+++ b/zephyr/projects/volteer/include/gpio_map.h
@@ -57,6 +57,7 @@
#define GPIO_VOLUME_DOWN_L NAMED_GPIO(ec_voldn_btn_odl)
#define GPIO_VOLUME_UP_L NAMED_GPIO(ec_volup_btn_odl)
#define GPIO_WP_L NAMED_GPIO(ec_wp_l)
+#define CONFIG_TEMP_SENSOR_POWER_GPIO NAMED_GPIO(pg_ec_dsw_pwrok)
/* USB-C interrupts */
#define GPIO_USB_C0_TCPC_INT_ODL NAMED_GPIO(usb_c0_tcpc_int_odl)