summaryrefslogtreecommitdiff
path: root/driver/ina2xx.h
diff options
context:
space:
mode:
authorJan Dabros <jsd@semihalf.com>2020-12-15 13:49:46 +0100
committerCommit Bot <commit-bot@chromium.org>2021-01-11 23:07:26 +0000
commit06d246945c1eee183c19d2cde58a5b658b305aa8 (patch)
tree5ba42f7d61e1a274045b74d003747af26dccd6d1 /driver/ina2xx.h
parent9fa7c906c2322413d5f8ee132ffcdf3654715b2f (diff)
downloadchrome-ec-06d246945c1eee183c19d2cde58a5b658b305aa8.tar.gz
ina2xx: Add API for setting/getting alerts
BUG:b:144776402 BRANCH:master TEST:Needs consecutive CL in order to verify setting power thresholds Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: I268e80fca0c1a1e763cd930a2b7f034438a8d88d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2592494 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/ina2xx.h')
-rw-r--r--driver/ina2xx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/driver/ina2xx.h b/driver/ina2xx.h
index 69d602abba..ec1e1ed92f 100644
--- a/driver/ina2xx.h
+++ b/driver/ina2xx.h
@@ -108,4 +108,16 @@ int ina2xx_get_current(uint8_t idx);
/* Return power in milliWatts */
int ina2xx_get_power(uint8_t idx);
+/* Return content of mask register */
+int ina2xx_get_mask(uint8_t idx);
+
+/* Set mask register to desired value */
+int ina2xx_set_mask(uint8_t idx, uint16_t mask);
+
+/* Return alert register value */
+int ina2xx_get_alert(uint8_t idx);
+
+/* Set alert register to desired value */
+int ina2xx_set_alert(uint8_t idx, uint16_t alert);
+
#endif /* __CROS_EC_INA2XX_H */