1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef __MAX8997_MUIC_H_
25#define __MAX8997_MUIC_H_
26
27#include <power/power_chrg.h>
28
29
30#define MAX8997_MUIC_CHG_NO 0x00
31#define MAX8997_MUIC_CHG_USB 0x01
32#define MAX8997_MUIC_CHG_USB_D 0x02
33#define MAX8997_MUIC_CHG_TA 0x03
34#define MAX8997_MUIC_CHG_TA_500 0x04
35#define MAX8997_MUIC_CHG_TA_1A 0x05
36#define MAX8997_MUIC_CHG_MASK 0x07
37
38
39enum {
40 MAX8997_MUIC_ID = 0x00,
41 MAX8997_MUIC_INT1 = 0x01,
42 MAX8997_MUIC_INT2 = 0x02,
43 MAX8997_MUIC_INT3 = 0x03,
44 MAX8997_MUIC_STATUS1 = 0x04,
45 MAX8997_MUIC_STATUS2 = 0x05,
46 MAX8997_MUIC_STATUS3 = 0x06,
47 MAX8997_MUIC_INTMASK1 = 0x07,
48 MAX8997_MUIC_INTMASK2 = 0x08,
49 MAX8997_MUIC_INTMASK3 = 0x09,
50 MAX8997_MUIC_CDETCTRL = 0x0A,
51 MAX8997_MUIC_CONTROL1 = 0x0C,
52 MAX8997_MUIC_CONTROL2 = 0x0D,
53 MAX8997_MUIC_CONTROL3 = 0x0E,
54
55 MUIC_NUM_OF_REGS = 0x0F,
56};
57
58#define MAX8997_MUIC_I2C_ADDR (0x4A >> 1)
59
60int power_muic_init(unsigned int bus);
61#endif
62