Merge tag 'lsk-android-14.04' into develop-3.10
[firefly-linux-kernel-4.4.55.git] / include / linux / regulator / ricoh619-regulator.h
1 /*
2  * linux/regulator/ricoh619-regulator.h
3  *
4  * Regulator driver for RICOH619 power management chip.
5  *
6  * Copyright (C) 2012-2013 RICOH COMPANY,LTD
7  *
8  * Based on code
9  *      Copyright (C) 2011 NVIDIA Corporation
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful, but WITHOUT
17  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
19  * more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23  *
24  */
25  
26 #ifndef __LINUX_REGULATOR_RICOH619_H
27 #define __LINUX_REGULATOR_RICOH619_H
28
29 #include <linux/regulator/machine.h>
30 #include <linux/regulator/driver.h>
31
32 #define ricoh619_rails(_name) "RICOH619_"#_name
33
34 /* RICHOH Regulator IDs */
35 enum regulator_id {
36         RICOH619_ID_DC1,
37         RICOH619_ID_DC2,        
38         RICOH619_ID_DC3,
39         RICOH619_ID_DC4,
40         RICOH619_ID_DC5,
41         RICOH619_ID_LDO1,
42         RICOH619_ID_LDO2,
43         RICOH619_ID_LDO3,
44         RICOH619_ID_LDO4,
45         RICOH619_ID_LDO5,
46         RICOH619_ID_LDO6,
47         RICOH619_ID_LDO7,
48         RICOH619_ID_LDO8,
49         RICOH619_ID_LDO9,
50         RICOH619_ID_LDO10,
51         RICOH619_ID_LDORTC1,
52         RICOH619_ID_LDORTC2,
53 };
54
55 struct ricoh619_regulator_platform_data {
56                 struct regulator_init_data regulator;
57                 int init_uV;
58                 unsigned init_enable:1;
59                 unsigned init_apply:1;
60                 int sleep_uV;
61                 int sleep_slots;
62                 unsigned long ext_pwr_req;
63                 unsigned long flags;
64 };
65
66 extern  int ricoh619_regulator_enable_eco_mode(struct regulator_dev *rdev);
67 extern  int ricoh619_regulator_disable_eco_mode(struct regulator_dev *rdev);
68 extern  int ricoh619_regulator_enable_eco_slp_mode(struct regulator_dev *rdev);
69 extern  int ricoh619_regulator_disable_eco_slp_mode(struct regulator_dev *rdev);
70
71
72 #endif