diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mfd/tps65090.h | 35 | ||||
| -rw-r--r-- | include/linux/regulator/driver.h | 3 | ||||
| -rw-r--r-- | include/linux/regulator/tps51632-regulator.h | 47 | ||||
| -rw-r--r-- | include/linux/regulator/tps65090-regulator.h | 50 |
4 files changed, 85 insertions, 50 deletions
diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h index 6bc31d854626..804e280c1e1d 100644 --- a/include/linux/mfd/tps65090.h +++ b/include/linux/mfd/tps65090.h | |||
| @@ -24,6 +24,25 @@ | |||
| 24 | 24 | ||
| 25 | #include <linux/irq.h> | 25 | #include <linux/irq.h> |
| 26 | 26 | ||
| 27 | /* TPS65090 Regulator ID */ | ||
| 28 | enum { | ||
| 29 | TPS65090_REGULATOR_DCDC1, | ||
| 30 | TPS65090_REGULATOR_DCDC2, | ||
| 31 | TPS65090_REGULATOR_DCDC3, | ||
| 32 | TPS65090_REGULATOR_FET1, | ||
| 33 | TPS65090_REGULATOR_FET2, | ||
| 34 | TPS65090_REGULATOR_FET3, | ||
| 35 | TPS65090_REGULATOR_FET4, | ||
| 36 | TPS65090_REGULATOR_FET5, | ||
| 37 | TPS65090_REGULATOR_FET6, | ||
| 38 | TPS65090_REGULATOR_FET7, | ||
| 39 | TPS65090_REGULATOR_LDO1, | ||
| 40 | TPS65090_REGULATOR_LDO2, | ||
| 41 | |||
| 42 | /* Last entry for maximum ID */ | ||
| 43 | TPS65090_REGULATOR_MAX, | ||
| 44 | }; | ||
| 45 | |||
| 27 | struct tps65090 { | 46 | struct tps65090 { |
| 28 | struct mutex lock; | 47 | struct mutex lock; |
| 29 | struct device *dev; | 48 | struct device *dev; |
| @@ -41,10 +60,26 @@ struct tps65090_subdev_info { | |||
| 41 | void *platform_data; | 60 | void *platform_data; |
| 42 | }; | 61 | }; |
| 43 | 62 | ||
| 63 | /* | ||
| 64 | * struct tps65090_regulator_plat_data | ||
| 65 | * | ||
| 66 | * @reg_init_data: The regulator init data. | ||
| 67 | * @enable_ext_control: Enable extrenal control or not. Only available for | ||
| 68 | * DCDC1, DCDC2 and DCDC3. | ||
| 69 | * @gpio: Gpio number if external control is enabled and controlled through | ||
| 70 | * gpio. | ||
| 71 | */ | ||
| 72 | struct tps65090_regulator_plat_data { | ||
| 73 | struct regulator_init_data *reg_init_data; | ||
| 74 | bool enable_ext_control; | ||
| 75 | int gpio; | ||
| 76 | }; | ||
| 77 | |||
| 44 | struct tps65090_platform_data { | 78 | struct tps65090_platform_data { |
| 45 | int irq_base; | 79 | int irq_base; |
| 46 | int num_subdevs; | 80 | int num_subdevs; |
| 47 | struct tps65090_subdev_info *subdevs; | 81 | struct tps65090_subdev_info *subdevs; |
| 82 | struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX]; | ||
| 48 | }; | 83 | }; |
| 49 | 84 | ||
| 50 | /* | 85 | /* |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 7932a3bf21bd..f2b72b230b9b 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
| @@ -181,6 +181,8 @@ enum regulator_type { | |||
| 181 | * @type: Indicates if the regulator is a voltage or current regulator. | 181 | * @type: Indicates if the regulator is a voltage or current regulator. |
| 182 | * @owner: Module providing the regulator, used for refcounting. | 182 | * @owner: Module providing the regulator, used for refcounting. |
| 183 | * | 183 | * |
| 184 | * @continuous_voltage_range: Indicates if the regulator can set any | ||
| 185 | * voltage within constrains range. | ||
| 184 | * @n_voltages: Number of selectors available for ops.list_voltage(). | 186 | * @n_voltages: Number of selectors available for ops.list_voltage(). |
| 185 | * | 187 | * |
| 186 | * @min_uV: Voltage given by the lowest selector (if linear mapping) | 188 | * @min_uV: Voltage given by the lowest selector (if linear mapping) |
| @@ -199,6 +201,7 @@ struct regulator_desc { | |||
| 199 | const char *name; | 201 | const char *name; |
| 200 | const char *supply_name; | 202 | const char *supply_name; |
| 201 | int id; | 203 | int id; |
| 204 | bool continuous_voltage_range; | ||
| 202 | unsigned n_voltages; | 205 | unsigned n_voltages; |
| 203 | struct regulator_ops *ops; | 206 | struct regulator_ops *ops; |
| 204 | int irq; | 207 | int irq; |
diff --git a/include/linux/regulator/tps51632-regulator.h b/include/linux/regulator/tps51632-regulator.h new file mode 100644 index 000000000000..d00841e1a75a --- /dev/null +++ b/include/linux/regulator/tps51632-regulator.h | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | /* | ||
| 2 | * tps51632-regulator.h -- TPS51632 regulator | ||
| 3 | * | ||
| 4 | * Interface for regulator driver for TPS51632 3-2-1 Phase D-Cap Step Down | ||
| 5 | * Driverless Controller with serial VID control and DVFS. | ||
| 6 | * | ||
| 7 | * Copyright (C) 2012 NVIDIA Corporation | ||
| 8 | |||
| 9 | * Author: Laxman Dewangan <ldewangan@nvidia.com> | ||
| 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 along | ||
| 22 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
| 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| 24 | * | ||
| 25 | */ | ||
| 26 | |||
| 27 | #ifndef __LINUX_REGULATOR_TPS51632_H | ||
| 28 | #define __LINUX_REGULATOR_TPS51632_H | ||
| 29 | |||
| 30 | /* | ||
| 31 | * struct tps51632_regulator_platform_data - tps51632 regulator platform data. | ||
| 32 | * | ||
| 33 | * @reg_init_data: The regulator init data. | ||
| 34 | * @enable_pwm_dvfs: Enable PWM DVFS or not. | ||
| 35 | * @dvfs_step_20mV: Step for DVFS is 20mV or 10mV. | ||
| 36 | * @max_voltage_uV: Maximum possible voltage in PWM-DVFS mode. | ||
| 37 | * @base_voltage_uV: Base voltage when PWM-DVFS enabled. | ||
| 38 | */ | ||
| 39 | struct tps51632_regulator_platform_data { | ||
| 40 | struct regulator_init_data *reg_init_data; | ||
| 41 | bool enable_pwm_dvfs; | ||
| 42 | bool dvfs_step_20mV; | ||
| 43 | int max_voltage_uV; | ||
| 44 | int base_voltage_uV; | ||
| 45 | }; | ||
| 46 | |||
| 47 | #endif /* __LINUX_REGULATOR_TPS51632_H */ | ||
diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h deleted file mode 100644 index 0fa04b64db3e..000000000000 --- a/include/linux/regulator/tps65090-regulator.h +++ /dev/null | |||
| @@ -1,50 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Regulator driver interface for TI TPS65090 PMIC family | ||
| 3 | * | ||
| 4 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. | ||
| 5 | |||
| 6 | * This program is free software; you can redistribute it and/or modify it | ||
| 7 | * under the terms and conditions of the GNU General Public License, | ||
| 8 | * version 2, as published by the Free Software Foundation. | ||
| 9 | |||
| 10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 13 | * more details. | ||
| 14 | |||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #ifndef __REGULATOR_TPS65090_H | ||
| 20 | #define __REGULATOR_TPS65090_H | ||
| 21 | |||
| 22 | #include <linux/regulator/machine.h> | ||
| 23 | |||
| 24 | #define tps65090_rails(_name) "tps65090_"#_name | ||
| 25 | |||
| 26 | enum { | ||
| 27 | TPS65090_ID_DCDC1, | ||
| 28 | TPS65090_ID_DCDC2, | ||
| 29 | TPS65090_ID_DCDC3, | ||
| 30 | TPS65090_ID_FET1, | ||
| 31 | TPS65090_ID_FET2, | ||
| 32 | TPS65090_ID_FET3, | ||
| 33 | TPS65090_ID_FET4, | ||
| 34 | TPS65090_ID_FET5, | ||
| 35 | TPS65090_ID_FET6, | ||
| 36 | TPS65090_ID_FET7, | ||
| 37 | }; | ||
| 38 | |||
| 39 | /* | ||
| 40 | * struct tps65090_regulator_platform_data | ||
| 41 | * | ||
| 42 | * @regulator: The regulator init data. | ||
| 43 | * @slew_rate_uV_per_us: Slew rate microvolt per microsec. | ||
| 44 | */ | ||
| 45 | |||
| 46 | struct tps65090_regulator_platform_data { | ||
| 47 | struct regulator_init_data regulator; | ||
| 48 | }; | ||
| 49 | |||
| 50 | #endif /* __REGULATOR_TPS65090_H */ | ||
