1
2
3
4
5
6
7
8
9
10
11#ifndef _LP8755_H
12#define _LP8755_H
13
14#include <linux/regulator/consumer.h>
15
16#define LP8755_NAME "lp8755-regulator"
17
18
19
20
21
22
23
24
25#define LP8755_EVENT_PWR_FAULT REGULATOR_EVENT_FAIL
26#define LP8755_EVENT_OCP REGULATOR_EVENT_OVER_CURRENT
27#define LP8755_EVENT_OVP 0x10000
28#define LP8755_EVENT_TEMP_WARN 0x2000
29#define LP8755_EVENT_TEMP_SHDN REGULATOR_EVENT_OVER_TEMP
30#define LP8755_EVENT_I_LOAD 0x40000
31
32enum lp8755_bucks {
33 LP8755_BUCK0 = 0,
34 LP8755_BUCK1,
35 LP8755_BUCK2,
36 LP8755_BUCK3,
37 LP8755_BUCK4,
38 LP8755_BUCK5,
39 LP8755_BUCK_MAX,
40};
41
42
43
44
45enum lp8755_mphase_config {
46 MPHASE_CONF0,
47 MPHASE_CONF1,
48 MPHASE_CONF2,
49 MPHASE_CONF3,
50 MPHASE_CONF4,
51 MPHASE_CONF5,
52 MPHASE_CONF6,
53 MPHASE_CONF7,
54 MPHASE_CONF8,
55 MPHASE_CONF_MAX
56};
57
58
59
60
61
62
63struct lp8755_platform_data {
64 int mphase;
65 struct regulator_init_data *buck_data[LP8755_BUCK_MAX];
66};
67#endif
68