summaryrefslogtreecommitdiff
path: root/driver/charger/rt9490.h
diff options
context:
space:
mode:
Diffstat (limited to 'driver/charger/rt9490.h')
-rw-r--r--driver/charger/rt9490.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/driver/charger/rt9490.h b/driver/charger/rt9490.h
index 7c718b9028..1a7abc51d3 100644
--- a/driver/charger/rt9490.h
+++ b/driver/charger/rt9490.h
@@ -6,6 +6,8 @@
*/
#include <stdbool.h>
+#include "temp_sensor.h"
+
#ifndef __CROS_EC_RT9490_H
#define __CROS_EC_RT9490_H
@@ -253,14 +255,11 @@ int rt9490_enable_pwm_1mhz(int chgnum, bool en);
#endif /* __CROS_EC_RT9490_H */
-int rt9490_get_thermistor_val(int idx, int *temp_ptr);
-
-struct charger_thermistor_data_pair {
- uint16_t mv; /* Scaled voltage level at ADC (in mV) */
- uint8_t temp; /* Temperature in Celsius */
-};
+/*
+ * Required for TS_ADC temperature calculation.
+ * Non-zephyr devices that using TS_ADC must define this in board layer.
+ */
+extern const struct thermistor_info rt9490_thermistor_info;
-struct charger_thermistor_info {
- uint8_t num_pairs;
- const struct charger_thermistor_data_pair *data;
-};
+int rt9490_get_thermistor_val(const struct temp_sensor_t *sensor,
+ int *temp_ptr);