aboutsummaryrefslogtreecommitdiff
path: root/include/twl6030.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/twl6030.h')
-rw-r--r--include/twl6030.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/twl6030.h b/include/twl6030.h
index b4035ba..9399737 100644
--- a/include/twl6030.h
+++ b/include/twl6030.h
@@ -113,6 +113,24 @@
#define GPCH0_LSB 0x57
#define GPCH0_MSB 0x58
+#define TWL6030_VBAT_MULT 40 * 1000
+
+#define TWL6030_VBAT_SHIFT (10 + 3)
+
+enum twl603x_chip_type{
+ chip_TWL6030,
+ chip_TWL603X_cnt
+};
+
+struct twl6030_data{
+ u8 chip_type;
+ u8 adc_rbase;
+ u8 adc_ctrl;
+ u8 adc_enable;
+ int vbat_mult;
+ int vbat_shift;
+};
+
/* Functions to read and write from TWL6030 */
static inline int twl6030_i2c_write_u8(u8 chip_no, u8 reg, u8 val)
{