diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 18:13:24 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 18:13:24 -0400 |
| commit | 9aca0e7c8c3a8f1fa6e3058abc5465b0509f0f8e (patch) | |
| tree | a905000d066defcc187e8e073134a1bee3c56fc1 /include/linux | |
| parent | a0e3390787ef523699ae1f3f3ea0ca953e630be2 (diff) | |
| parent | ec10b0e94ebe7de3b301d60e6f7f4a12d3d280c6 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator: max8952 - fix max8952_set_voltage
regulator: max8952 - fix max8952_pmic_probe error path
regulator: fix build when CONFIG_REGULATOR_DUMMY=n
regulator: avoid deadlock when disabling regulator with supply
regulator: Add option for machine drivers to enable the dummy regulator
Regulator: lp3972 cleanup
Regulator: LP3972 PMIC regulator driver
MAX8952 PMIC Driver Initial Release
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/regulator/lp3972.h | 48 | ||||
| -rw-r--r-- | include/linux/regulator/machine.h | 5 | ||||
| -rw-r--r-- | include/linux/regulator/max8952.h | 135 |
3 files changed, 188 insertions, 0 deletions
diff --git a/include/linux/regulator/lp3972.h b/include/linux/regulator/lp3972.h new file mode 100644 index 000000000000..9bb7389b7a1e --- /dev/null +++ b/include/linux/regulator/lp3972.h | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | * National Semiconductors LP3972 PMIC chip client interface | ||
| 3 | * | ||
| 4 | * Based on lp3971.h | ||
| 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; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __LINUX_REGULATOR_LP3972_H | ||
| 22 | #define __LINUX_REGULATOR_LP3972_H | ||
| 23 | |||
| 24 | #include <linux/regulator/machine.h> | ||
| 25 | |||
| 26 | #define LP3972_LDO1 0 | ||
| 27 | #define LP3972_LDO2 1 | ||
| 28 | #define LP3972_LDO3 2 | ||
| 29 | #define LP3972_LDO4 3 | ||
| 30 | #define LP3972_LDO5 4 | ||
| 31 | |||
| 32 | #define LP3972_DCDC1 5 | ||
| 33 | #define LP3972_DCDC2 6 | ||
| 34 | #define LP3972_DCDC3 7 | ||
| 35 | |||
| 36 | #define LP3972_NUM_REGULATORS 8 | ||
| 37 | |||
| 38 | struct lp3972_regulator_subdev { | ||
| 39 | int id; | ||
| 40 | struct regulator_init_data *initdata; | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct lp3972_platform_data { | ||
| 44 | int num_regulators; | ||
| 45 | struct lp3972_regulator_subdev *regulators; | ||
| 46 | }; | ||
| 47 | |||
| 48 | #endif | ||
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index e2980287245e..761c745b9c24 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
| @@ -189,10 +189,15 @@ int regulator_suspend_prepare(suspend_state_t state); | |||
| 189 | 189 | ||
| 190 | #ifdef CONFIG_REGULATOR | 190 | #ifdef CONFIG_REGULATOR |
| 191 | void regulator_has_full_constraints(void); | 191 | void regulator_has_full_constraints(void); |
| 192 | void regulator_use_dummy_regulator(void); | ||
| 192 | #else | 193 | #else |
| 193 | static inline void regulator_has_full_constraints(void) | 194 | static inline void regulator_has_full_constraints(void) |
| 194 | { | 195 | { |
| 195 | } | 196 | } |
| 197 | |||
| 198 | static inline void regulator_use_dummy_regulator(void) | ||
| 199 | { | ||
| 200 | } | ||
| 196 | #endif | 201 | #endif |
| 197 | 202 | ||
| 198 | #endif | 203 | #endif |
diff --git a/include/linux/regulator/max8952.h b/include/linux/regulator/max8952.h new file mode 100644 index 000000000000..45e42855ad05 --- /dev/null +++ b/include/linux/regulator/max8952.h | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | /* | ||
| 2 | * max8952.h - Voltage regulation for the Maxim 8952 | ||
| 3 | * | ||
| 4 | * Copyright (C) 2010 Samsung Electrnoics | ||
| 5 | * MyungJoo Ham <myungjoo.ham@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License as published by | ||
| 9 | * the Free Software Foundation; either version 2 of the License, or | ||
| 10 | * (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This program is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | * GNU General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU General Public License | ||
| 18 | * along with this program; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef REGULATOR_MAX8952 | ||
| 23 | #define REGULATOR_MAX8952 | ||
| 24 | |||
| 25 | #include <linux/regulator/machine.h> | ||
| 26 | |||
| 27 | enum { | ||
| 28 | MAX8952_DVS_MODE0, | ||
| 29 | MAX8952_DVS_MODE1, | ||
| 30 | MAX8952_DVS_MODE2, | ||
| 31 | MAX8952_DVS_MODE3, | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum { | ||
| 35 | MAX8952_DVS_770mV = 0, | ||
| 36 | MAX8952_DVS_780mV, | ||
| 37 | MAX8952_DVS_790mV, | ||
| 38 | MAX8952_DVS_800mV, | ||
| 39 | MAX8952_DVS_810mV, | ||
| 40 | MAX8952_DVS_820mV, | ||
| 41 | MAX8952_DVS_830mV, | ||
| 42 | MAX8952_DVS_840mV, | ||
| 43 | MAX8952_DVS_850mV, | ||
| 44 | MAX8952_DVS_860mV, | ||
| 45 | MAX8952_DVS_870mV, | ||
| 46 | MAX8952_DVS_880mV, | ||
| 47 | MAX8952_DVS_890mV, | ||
| 48 | MAX8952_DVS_900mV, | ||
| 49 | MAX8952_DVS_910mV, | ||
| 50 | MAX8952_DVS_920mV, | ||
| 51 | MAX8952_DVS_930mV, | ||
| 52 | MAX8952_DVS_940mV, | ||
| 53 | MAX8952_DVS_950mV, | ||
| 54 | MAX8952_DVS_960mV, | ||
| 55 | MAX8952_DVS_970mV, | ||
| 56 | MAX8952_DVS_980mV, | ||
| 57 | MAX8952_DVS_990mV, | ||
| 58 | MAX8952_DVS_1000mV, | ||
| 59 | MAX8952_DVS_1010mV, | ||
| 60 | MAX8952_DVS_1020mV, | ||
| 61 | MAX8952_DVS_1030mV, | ||
| 62 | MAX8952_DVS_1040mV, | ||
| 63 | MAX8952_DVS_1050mV, | ||
| 64 | MAX8952_DVS_1060mV, | ||
| 65 | MAX8952_DVS_1070mV, | ||
| 66 | MAX8952_DVS_1080mV, | ||
| 67 | MAX8952_DVS_1090mV, | ||
| 68 | MAX8952_DVS_1100mV, | ||
| 69 | MAX8952_DVS_1110mV, | ||
| 70 | MAX8952_DVS_1120mV, | ||
| 71 | MAX8952_DVS_1130mV, | ||
| 72 | MAX8952_DVS_1140mV, | ||
| 73 | MAX8952_DVS_1150mV, | ||
| 74 | MAX8952_DVS_1160mV, | ||
| 75 | MAX8952_DVS_1170mV, | ||
| 76 | MAX8952_DVS_1180mV, | ||
| 77 | MAX8952_DVS_1190mV, | ||
| 78 | MAX8952_DVS_1200mV, | ||
| 79 | MAX8952_DVS_1210mV, | ||
| 80 | MAX8952_DVS_1220mV, | ||
| 81 | MAX8952_DVS_1230mV, | ||
| 82 | MAX8952_DVS_1240mV, | ||
| 83 | MAX8952_DVS_1250mV, | ||
| 84 | MAX8952_DVS_1260mV, | ||
| 85 | MAX8952_DVS_1270mV, | ||
| 86 | MAX8952_DVS_1280mV, | ||
| 87 | MAX8952_DVS_1290mV, | ||
| 88 | MAX8952_DVS_1300mV, | ||
| 89 | MAX8952_DVS_1310mV, | ||
| 90 | MAX8952_DVS_1320mV, | ||
| 91 | MAX8952_DVS_1330mV, | ||
| 92 | MAX8952_DVS_1340mV, | ||
| 93 | MAX8952_DVS_1350mV, | ||
| 94 | MAX8952_DVS_1360mV, | ||
| 95 | MAX8952_DVS_1370mV, | ||
| 96 | MAX8952_DVS_1380mV, | ||
| 97 | MAX8952_DVS_1390mV, | ||
| 98 | MAX8952_DVS_1400mV, | ||
| 99 | }; | ||
| 100 | |||
| 101 | enum { | ||
| 102 | MAX8952_SYNC_FREQ_26MHZ, /* Default */ | ||
| 103 | MAX8952_SYNC_FREQ_13MHZ, | ||
| 104 | MAX8952_SYNC_FREQ_19_2MHZ, | ||
| 105 | }; | ||
| 106 | |||
| 107 | enum { | ||
| 108 | MAX8952_RAMP_32mV_us = 0, /* Default */ | ||
| 109 | MAX8952_RAMP_16mV_us, | ||
| 110 | MAX8952_RAMP_8mV_us, | ||
| 111 | MAX8952_RAMP_4mV_us, | ||
| 112 | MAX8952_RAMP_2mV_us, | ||
| 113 | MAX8952_RAMP_1mV_us, | ||
| 114 | MAX8952_RAMP_0_5mV_us, | ||
| 115 | MAX8952_RAMP_0_25mV_us, | ||
| 116 | }; | ||
| 117 | |||
| 118 | #define MAX8952_NUM_DVS_MODE 4 | ||
| 119 | |||
| 120 | struct max8952_platform_data { | ||
| 121 | int gpio_vid0; | ||
| 122 | int gpio_vid1; | ||
| 123 | int gpio_en; | ||
| 124 | |||
| 125 | u8 default_mode; | ||
| 126 | u8 dvs_mode[MAX8952_NUM_DVS_MODE]; /* MAX8952_DVS_MODEx_XXXXmV */ | ||
| 127 | |||
| 128 | u8 sync_freq; | ||
| 129 | u8 ramp_speed; | ||
| 130 | |||
| 131 | struct regulator_init_data reg_data; | ||
| 132 | }; | ||
| 133 | |||
| 134 | |||
| 135 | #endif /* REGULATOR_MAX8952 */ | ||
