1
2
3
4
5
6
7
8
9 #ifndef __RT5033_H__
10 #define __RT5033_H__
11
12 #include <linux/regulator/consumer.h>
13 #include <linux/i2c.h>
14 #include <linux/regmap.h>
15 #include <linux/power_supply.h>
16
17
18 enum rt5033_regulators {
19 RT5033_BUCK = 0,
20 RT5033_LDO,
21 RT5033_SAFE_LDO,
22
23 RT5033_REGULATOR_NUM,
24 };
25
26 struct rt5033_dev {
27 struct device *dev;
28
29 struct regmap *regmap;
30 struct regmap_irq_chip_data *irq_data;
31 int irq;
32 bool wakeup;
33 };
34
35 struct rt5033_battery {
36 struct i2c_client *client;
37 struct rt5033_dev *rt5033;
38 struct regmap *regmap;
39 struct power_supply *psy;
40 };
41
42
43 struct rt5033_charger_data {
44 unsigned int pre_uamp;
45 unsigned int pre_uvolt;
46 unsigned int const_uvolt;
47 unsigned int eoc_uamp;
48 unsigned int fast_uamp;
49 };
50
51 struct rt5033_charger {
52 struct device *dev;
53 struct rt5033_dev *rt5033;
54 struct power_supply psy;
55
56 struct rt5033_charger_data *chg;
57 };
58
59 #endif