973be235a24b399cee987cae6e8854621a51d22b
[firefly-linux-kernel-4.4.55.git] / include / linux / regulator / rockchip-pwm-regulator.h
1 /* include/linux/regulator/charge-regulator.h\r
2  *\r
3  * Copyright (C) 2010 ROCKCHIP, Inc.\r
4  *\r
5  * This software is licensed under the terms of the GNU General Public\r
6  * License version 2, as published by the Free Software Foundation, and\r
7  * may be copied, distributed, and modified under those terms.\r
8  *\r
9  * This program is distributed in the hope that it will be useful,\r
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
12  * GNU General Public License for more details.\r
13  *\r
14  */\r
15 #ifndef __LINUX_REGULATOR_PWM_H\r
16 \r
17 #define __LINUX_REGULATOR_PWM_H\r
18 \r
19 #include <linux/regulator/machine.h>\r
20 //#include <plat/pwm.h>\r
21 \r
22 #define PWM_DIV              PWM_DIV2\r
23 \r
24 \r
25 struct regulator_init_data;\r
26 \r
27 struct pwm_platform_data {\r
28         int     pwm_id;\r
29         int     pwm_gpio;\r
30         struct pwm_device       *pwm;\r
31         unsigned int            period;\r
32         unsigned int pwm_period_ns;\r
33         unsigned int            scale;\r
34         unsigned int    pwm_voltage;\r
35         unsigned int    suspend_voltage;\r
36         unsigned int    coefficient;\r
37         unsigned int    min_uV;\r
38         unsigned int    max_uV;\r
39         unsigned int    *pwm_voltage_map;\r
40         struct regulator_init_data *init_data;\r
41         int num_regulators;\r
42         struct regulator_dev **rdev;\r
43         int pwm_vol_map_count;\r
44 };\r
45 \r
46 struct pwm_regulator_board {\r
47         int pwm_gpio;\r
48         struct pwm_device       *pwm;\r
49         struct regulator_init_data *pwm_init_data[4];\r
50         struct device_node *of_node[4];\r
51         int     pwm_id;\r
52         unsigned int *pwm_voltage_map; \r
53         unsigned int pwm_init_vol;\r
54         unsigned int pwm_max_vol;\r
55         unsigned int pwm_min_vol;\r
56         unsigned int pwm_suspend_vol;\r
57         unsigned int pwm_coefficient;\r
58         int num_regulators;\r
59         struct regulator_dev **rdev;\r
60         int pwm_vol_map_count;\r
61 };\r
62 \r
63 #endif\r
64 \r