Merge tag 'lsk-android-14.04' into develop-3.10
[firefly-linux-kernel-4.4.55.git] / include / linux / regulator / act8846.h
1 /* include/linux/regulator/act8846.h
2  *
3  * Copyright (C) 2011 ROCKCHIP, Inc.
4  *
5  * This software is licensed under the terms of the GNU General Public
6  * License version 2, as published by the Free Software Foundation, and
7  * may be copied, distributed, and modified under those terms.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  */
15 #ifndef __LINUX_REGULATOR_act8846_H
16 #define __LINUX_REGULATOR_act8846_H
17
18 #include <linux/regulator/machine.h>
19
20 //#define ACT8846_START 30
21
22 #define ACT8846_DCDC1  0                     //(0+ACT8846_START) 
23
24 #define ACT8846_LDO1 4                //(4+ACT8846_START)
25
26
27 #define act8846_NUM_REGULATORS 12
28 struct act8846;
29
30 int act8846_device_shutdown(void);
31
32 struct act8846_board {
33         int irq;
34         int irq_base;
35         struct regulator_init_data *act8846_init_data[act8846_NUM_REGULATORS];
36         struct device_node *of_node[act8846_NUM_REGULATORS];
37         int pmic_sleep_gpio; /* */
38         unsigned int dcdc_slp_voltage[3]; /* buckx_voltage in uV */
39         unsigned int dcdc_mode[3]; /* buckx_voltage in uV */
40         bool pmic_sleep;
41         unsigned int ldo_slp_voltage[7];
42 };
43
44 struct act8846_regulator_subdev {
45         int id;
46         struct regulator_init_data *initdata;
47         struct device_node *reg_node;
48 };
49
50 struct act8846_platform_data {
51         int ono;
52         int num_regulators;
53         struct act8846_regulator_subdev *regulators;
54         
55         int pmic_sleep_gpio; /* */
56         unsigned int dcdc_slp_voltage[3]; /* buckx_voltage in uV */
57         bool pmic_sleep;
58         unsigned int ldo_slp_voltage[7];
59 };
60
61 #endif
62