summaryrefslogtreecommitdiff
path: root/driver/temp_sensor
diff options
context:
space:
mode:
authorAaron Massey <aaronmassey@google.com>2021-09-24 11:22:12 -0600
committerCommit Bot <commit-bot@chromium.org>2021-09-24 19:47:45 +0000
commit465c9dc87a353f48b969da0631c4fd2b6df32a4f (patch)
treeeae7fa5a0f92cb81af315eb7912267167ed078e1 /driver/temp_sensor
parentfc2b67a878f6c57c02569253032fc5d09f6c581e (diff)
downloadchrome-ec-465c9dc87a353f48b969da0631c4fd2b6df32a4f.tar.gz
zephyr: drivers: thermistors are device tree nodes
Thermistor drivers now query the device tree for configuration. Thermistor tests have been updated to be parameterized on all thermistors enabled in the device tree. BRANCH=none BUG=b:184374937 TEST= 1) zmake testall 2) make runhosttests Cq-Depend: chromium:3161332 Signed-off-by: Aaron Massey <aaronmassey@chromium.org> Change-Id: Ic5330cd5c33e79e192428ca857651de9a225856e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133812 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Aaron Massey <aaronmassey@google.com>
Diffstat (limited to 'driver/temp_sensor')
-rw-r--r--driver/temp_sensor/thermistor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/driver/temp_sensor/thermistor.c b/driver/temp_sensor/thermistor.c
index d895aa58f0..ffa780cb07 100644
--- a/driver/temp_sensor/thermistor.c
+++ b/driver/temp_sensor/thermistor.c
@@ -70,9 +70,10 @@ int thermistor_linear_interpolate(uint16_t mv,
defined(CONFIG_STEINHART_HART_3V3_13K7_47K_4050B) || \
defined(CONFIG_STEINHART_HART_6V0_51K1_47K_4050B) || \
defined(CONFIG_STEINHART_HART_3V0_22K6_47K_4050B) || \
- defined(CONFIG_STEINHART_HART_3V3_30K9_47K_4050B)
-static int thermistor_get_temperature(int idx_adc, int *temp_ptr,
- const struct thermistor_info *info)
+ defined(CONFIG_STEINHART_HART_3V3_30K9_47K_4050B) || \
+ defined(CONFIG_ZEPHYR)
+int thermistor_get_temperature(int idx_adc, int *temp_ptr,
+ const struct thermistor_info *info)
{
int mv;