summaryrefslogtreecommitdiff
path: root/driver/temp_sensor/tmp112.h
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2021-06-04 15:03:11 -0600
committerCommit Bot <commit-bot@chromium.org>2021-06-07 23:41:31 +0000
commiteb26a5557b189dc45c38fd04b580a016bcd5880d (patch)
tree2979a06c06975df7d2011a1f5ca6e669d23cf50b /driver/temp_sensor/tmp112.h
parentf36c5bd34a2399e1c73411162b46fe993af4d02b (diff)
downloadchrome-ec-eb26a5557b189dc45c38fd04b580a016bcd5880d.tar.gz
TMP112: Make init externally available
Since not all boards will power the TMP112 in all power states, allow boards to trigger init themselves when they power up the chip. BRANCH=None BUG=b:188539950 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id24f559d745e86cdcf2f39a10111decc0797bf28 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2940574 Reviewed-by: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'driver/temp_sensor/tmp112.h')
-rw-r--r--driver/temp_sensor/tmp112.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/driver/temp_sensor/tmp112.h b/driver/temp_sensor/tmp112.h
index af9506ec5b..fce7edc15b 100644
--- a/driver/temp_sensor/tmp112.h
+++ b/driver/temp_sensor/tmp112.h
@@ -44,4 +44,11 @@ extern const struct tmp112_sensor_t tmp112_sensors[];
*/
int tmp112_get_val(int idx, int *temp_ptr);
+/**
+ * Init the sensors. Note, this will run automatically on HOOK_INIT, but is
+ * made available for boards which may not always power the sensor in all
+ * states.
+ */
+void tmp112_init(void);
+
#endif /* __CROS_EC_TMP112_H */