summaryrefslogtreecommitdiff
path: root/baseboard/zork
diff options
context:
space:
mode:
authorDevin Lu <devin.lu@quantatw.com>2020-06-08 13:11:45 +0800
committerCommit Bot <commit-bot@chromium.org>2020-06-15 00:11:21 +0000
commit3df08544d75c8854c8d0088e2afb4fe88f94b64b (patch)
tree33919550c9104bf61ee85c664dc0b14dd04f6587 /baseboard/zork
parente2a86fa31cda43b76ddfec4df6a1a9cf91f90e6c (diff)
downloadchrome-ec-3df08544d75c8854c8d0088e2afb4fe88f94b64b.tar.gz
berknip: add 5V regulator temperature sensor
Add a thermistor which near to 5V regulator. BUG=b:157711232 BRANCH=none TEST=Verified console "temps" can read temperature. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I0020fc74b9b4b3f16dae7a1263e793ec2783b665 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2234047 Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'baseboard/zork')
-rw-r--r--baseboard/zork/baseboard.c4
-rw-r--r--baseboard/zork/baseboard.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/baseboard/zork/baseboard.c b/baseboard/zork/baseboard.c
index a848341bb2..b2afc18793 100644
--- a/baseboard/zork/baseboard.c
+++ b/baseboard/zork/baseboard.c
@@ -170,13 +170,13 @@ const struct thermistor_info thermistor_info = {
.data = thermistor_data,
};
-int board_get_temp(int idx, int *temp_k)
+__overridable int board_get_temp(int idx, int *temp_k)
{
int mv;
int temp_c;
enum adc_channel channel;
- /* idx is the sensor index set below in temp_sensors[] */
+ /* idx is the sensor index set in board temp_sensors[] */
switch (idx) {
case TEMP_SENSOR_CHARGER:
channel = ADC_TEMP_SENSOR_CHARGER;
diff --git a/baseboard/zork/baseboard.h b/baseboard/zork/baseboard.h
index 04fd6d34c6..edeb359d52 100644
--- a/baseboard/zork/baseboard.h
+++ b/baseboard/zork/baseboard.h
@@ -323,6 +323,8 @@ enum sensor_id {
*/
extern mat33_fp_t zork_base_standard_ref;
+extern const struct thermistor_info thermistor_info;
+
/* Sensors without hardware FIFO are in forced mode */
#define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL)