diff options
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/consumer.h | 2 | ||||
-rw-r--r-- | include/linux/regulator/machine.h | 6 | ||||
-rw-r--r-- | include/linux/regulator/max8660.h | 57 |
3 files changed, 64 insertions, 1 deletions
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 490c5b37b6d7..030d92255c7a 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -35,6 +35,8 @@ | |||
35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ | 35 | #ifndef __LINUX_REGULATOR_CONSUMER_H_ |
36 | #define __LINUX_REGULATOR_CONSUMER_H_ | 36 | #define __LINUX_REGULATOR_CONSUMER_H_ |
37 | 37 | ||
38 | #include <linux/device.h> | ||
39 | |||
38 | /* | 40 | /* |
39 | * Regulator operating modes. | 41 | * Regulator operating modes. |
40 | * | 42 | * |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index 87f5f176d4ef..234a8476cba8 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -43,16 +43,20 @@ struct regulator; | |||
43 | /** | 43 | /** |
44 | * struct regulator_state - regulator state during low power system states | 44 | * struct regulator_state - regulator state during low power system states |
45 | * | 45 | * |
46 | * This describes a regulators state during a system wide low power state. | 46 | * This describes a regulators state during a system wide low power |
47 | * state. One of enabled or disabled must be set for the | ||
48 | * configuration to be applied. | ||
47 | * | 49 | * |
48 | * @uV: Operating voltage during suspend. | 50 | * @uV: Operating voltage during suspend. |
49 | * @mode: Operating mode during suspend. | 51 | * @mode: Operating mode during suspend. |
50 | * @enabled: Enabled during suspend. | 52 | * @enabled: Enabled during suspend. |
53 | * @disabled: Disabled during suspend. | ||
51 | */ | 54 | */ |
52 | struct regulator_state { | 55 | struct regulator_state { |
53 | int uV; /* suspend voltage */ | 56 | int uV; /* suspend voltage */ |
54 | unsigned int mode; /* suspend regulator operating mode */ | 57 | unsigned int mode; /* suspend regulator operating mode */ |
55 | int enabled; /* is regulator enabled in this suspend state */ | 58 | int enabled; /* is regulator enabled in this suspend state */ |
59 | int disabled; /* is the regulator disbled in this suspend state */ | ||
56 | }; | 60 | }; |
57 | 61 | ||
58 | /** | 62 | /** |
diff --git a/include/linux/regulator/max8660.h b/include/linux/regulator/max8660.h new file mode 100644 index 000000000000..9936763621c7 --- /dev/null +++ b/include/linux/regulator/max8660.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /* | ||
2 | * max8660.h -- Voltage regulation for the Maxim 8660/8661 | ||
3 | * | ||
4 | * Copyright (C) 2009 Wolfram Sang, Pengutronix e.K. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; version 2 of the License. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __LINUX_REGULATOR_MAX8660_H | ||
21 | #define __LINUX_REGULATOR_MAX8660_H | ||
22 | |||
23 | #include <linux/regulator/machine.h> | ||
24 | |||
25 | enum { | ||
26 | MAX8660_V3, | ||
27 | MAX8660_V4, | ||
28 | MAX8660_V5, | ||
29 | MAX8660_V6, | ||
30 | MAX8660_V7, | ||
31 | MAX8660_V_END, | ||
32 | }; | ||
33 | |||
34 | /** | ||
35 | * max8660_subdev_data - regulator subdev data | ||
36 | * @id: regulator id | ||
37 | * @name: regulator name | ||
38 | * @platform_data: regulator init data | ||
39 | */ | ||
40 | struct max8660_subdev_data { | ||
41 | int id; | ||
42 | char *name; | ||
43 | struct regulator_init_data *platform_data; | ||
44 | }; | ||
45 | |||
46 | /** | ||
47 | * max8660_platform_data - platform data for max8660 | ||
48 | * @num_subdevs: number of regulators used | ||
49 | * @subdevs: pointer to regulators used | ||
50 | * @en34_is_high: if EN34 is driven high, regulators cannot be en-/disabled. | ||
51 | */ | ||
52 | struct max8660_platform_data { | ||
53 | int num_subdevs; | ||
54 | struct max8660_subdev_data *subdevs; | ||
55 | unsigned en34_is_high:1; | ||
56 | }; | ||
57 | #endif | ||