diff options
Diffstat (limited to 'include/linux/regulator')
-rw-r--r-- | include/linux/regulator/max8973-regulator.h | 77 | ||||
-rw-r--r-- | include/linux/regulator/tps62360.h | 2 | ||||
-rw-r--r-- | include/linux/regulator/tps6238x0-regulator.h | 46 | ||||
-rw-r--r-- | include/linux/regulator/tps80031-regulator.h | 4 |
4 files changed, 127 insertions, 2 deletions
diff --git a/include/linux/regulator/max8973-regulator.h b/include/linux/regulator/max8973-regulator.h new file mode 100644 index 000000000000..4b86e88b028e --- /dev/null +++ b/include/linux/regulator/max8973-regulator.h @@ -0,0 +1,77 @@ +/* + * max8973-regulator.h -- MAXIM 8973 regulator + * + * Interface for regulator driver for MAXIM 8973 DC-DC step-down + * switching regulator. + * + * Copyright (C) 2012 NVIDIA Corporation + + * Author: Laxman Dewangan <ldewangan@nvidia.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef __LINUX_REGULATOR_MAX8973_H +#define __LINUX_REGULATOR_MAX8973_H + +/* + * Control flags for configuration of the device. + * Client need to pass this information with ORed + */ +#define MAX8973_CONTROL_REMOTE_SENSE_ENABLE 0x00000001 +#define MAX8973_CONTROL_FALLING_SLEW_RATE_ENABLE 0x00000002 +#define MAX8973_CONTROL_OUTPUT_ACTIVE_DISCH_ENABLE 0x00000004 +#define MAX8973_CONTROL_BIAS_ENABLE 0x00000008 +#define MAX8973_CONTROL_PULL_DOWN_ENABLE 0x00000010 +#define MAX8973_CONTROL_FREQ_SHIFT_9PER_ENABLE 0x00000020 + +#define MAX8973_CONTROL_SLEW_RATE_12_5mV_PER_US 0x00000000 +#define MAX8973_CONTROL_SLEW_RATE_25mV_PER_US 0x00000100 +#define MAX8973_CONTROL_SLEW_RATE_50mV_PER_US 0x00000200 +#define MAX8973_CONTROL_SLEW_RATE_200MV_PER_US 0x00000300 + +#define MAX8973_CONTROL_CLKADV_TRIP_DISABLED 0x00000000 +#define MAX8973_CONTROL_CLKADV_TRIP_75mV_PER_US 0x00010000 +#define MAX8973_CONTROL_CLKADV_TRIP_150mV_PER_US 0x00020000 +#define MAX8973_CONTROL_CLKADV_TRIP_75mV_PER_US_HIST_DIS 0x00030000 + +#define MAX8973_CONTROL_INDUCTOR_VALUE_NOMINAL 0x00000000 +#define MAX8973_CONTROL_INDUCTOR_VALUE_MINUS_30_PER 0x00100000 +#define MAX8973_CONTROL_INDUCTOR_VALUE_PLUS_30_PER 0x00200000 +#define MAX8973_CONTROL_INDUCTOR_VALUE_PLUS_60_PER 0x00300000 + +/* + * struct max8973_regulator_platform_data - max8973 regulator platform data. + * + * @reg_init_data: The regulator init data. + * @control_flags: Control flags which are ORed value of above flags to + * configure device. + * @enable_ext_control: Enable the voltage enable/disable through external + * control signal from EN input pin. If it is false then + * voltage output will be enabled/disabled through EN bit of + * device register. + * @dvs_gpio: GPIO for dvs. It should be -1 if this is tied with fixed logic. + * @dvs_def_state: Default state of dvs. 1 if it is high else 0. + */ +struct max8973_regulator_platform_data { + struct regulator_init_data *reg_init_data; + unsigned long control_flags; + bool enable_ext_control; + int dvs_gpio; + unsigned dvs_def_state:1; +}; + +#endif /* __LINUX_REGULATOR_MAX8973_H */ diff --git a/include/linux/regulator/tps62360.h b/include/linux/regulator/tps62360.h index 6a5c1b2c751e..6475cd029c42 100644 --- a/include/linux/regulator/tps62360.h +++ b/include/linux/regulator/tps62360.h @@ -32,7 +32,6 @@ * struct tps62360_regulator_platform_data - tps62360 regulator platform data. * * @reg_init_data: The regulator init data. - * @en_force_pwm: Enable force pwm or not. * @en_discharge: Enable discharge the output capacitor via internal * register. * @en_internal_pulldn: internal pull down enable or not. @@ -45,7 +44,6 @@ */ struct tps62360_regulator_platform_data { struct regulator_init_data reg_init_data; - bool en_force_pwm; bool en_discharge; bool en_internal_pulldn; int vsel0_gpio; diff --git a/include/linux/regulator/tps6238x0-regulator.h b/include/linux/regulator/tps6238x0-regulator.h new file mode 100644 index 000000000000..d7c4edc5b101 --- /dev/null +++ b/include/linux/regulator/tps6238x0-regulator.h @@ -0,0 +1,46 @@ +/* + * tps6238x0-regulator.h -- TI TPS623850/TPS623860/TPS623870 + * + * Interface for regulator driver for TI TPS623850/TPS623860/TPS623870 + * Processor core supply + * + * Copyright (C) 2012 NVIDIA Corporation + + * Author: Laxman Dewangan <ldewangan@nvidia.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef __LINUX_REGULATOR_TPS6238X0_H +#define __LINUX_REGULATOR_TPS6238X0_H + +/* + * struct tps6238x0_regulator_platform_data - tps62360 regulator platform data. + * + * @init_data: The regulator init data. + * @en_internal_pulldn: internal pull down enable or not. + * @vsel_gpio: Gpio number for vsel. It should be -1 if this is tied with + * fixed logic. + * @vsel_def_state: Default state of vsel. 1 if it is high else 0. + */ +struct tps6238x0_regulator_platform_data { + struct regulator_init_data *init_data; + bool en_internal_pulldn; + int vsel_gpio; + int vsel_def_state; +}; + +#endif /* __LINUX_REGULATOR_TPS6238X0_H */ diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 1670d147fc3e..4dfdf7950918 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -74,6 +74,9 @@ enum { * @flags: Configuration flag to configure the rails. It should be ORed of * above enums. * @delay_us: Delay in microsecond after setting the desired voltage. + * @tolerance_uv: Tolerance micorvolts in minimum side. The voltage min + * will be adjusted to this tolerance like + * actual_vmin = vmin - tolerance_uv */ struct tps80031_regulator_platform_data { @@ -84,6 +87,7 @@ struct tps80031_regulator_platform_data { unsigned int ext_ctrl_flag; unsigned int flags; int delay_us; + unsigned int tolerance_uv; }; #endif /* __REGULATOR_TPS80031_H */ |