aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator/tps6591x-regulator.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/regulator/tps6591x-regulator.h')
-rw-r--r--include/linux/regulator/tps6591x-regulator.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/include/linux/regulator/tps6591x-regulator.h b/include/linux/regulator/tps6591x-regulator.h
new file mode 100644
index 00000000000..7f7f647906d
--- /dev/null
+++ b/include/linux/regulator/tps6591x-regulator.h
@@ -0,0 +1,77 @@
1/*
2 * include/linux/regulator/tps6591x-regulator.h
3 *
4 * Interface for regulator driver for TI TPS6591x PMIC family
5 *
6 * Copyright (C) 2011 NVIDIA Corporation
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 * more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *
22 */
23
24#ifndef __REGULATOR_TPS6591X_H
25#define __REGULATOR_TPS6591X_H
26
27#include <linux/regulator/machine.h>
28
29#define tps6591x_rails(_name) "tps6591x_"#_name
30
31enum {
32 TPS6591X_ID_VIO,
33 TPS6591X_ID_VDD_1,
34 TPS6591X_ID_VDD_2,
35 TPS6591X_ID_VDDCTRL,
36 TPS6591X_ID_LDO_1,
37 TPS6591X_ID_LDO_2,
38 TPS6591X_ID_LDO_3,
39 TPS6591X_ID_LDO_4,
40 TPS6591X_ID_LDO_5,
41 TPS6591X_ID_LDO_6,
42 TPS6591X_ID_LDO_7,
43 TPS6591X_ID_LDO_8,
44};
45
46enum tps6591x_ext_control {
47 EXT_CTRL_NONE = 0x0,
48 EXT_CTRL_EN1,
49 EXT_CTRL_EN2,
50 EXT_CTRL_SLEEP_OFF,
51};
52
53enum tps6591x_config_flags {
54 LDO_LOW_POWER_ON_SUSPEND = 0x1,
55};
56
57/*
58 * struct tps6591x_regulator_platform_data - tps6591x regulator platform data.
59 *
60 * @regulator: The regulator init data.
61 * @init_uV: initial micro volts which need to be set.
62 * @init_enable: Enable or do not enable the rails during initialization.
63 * @init_apply: Init parameter applied or not.
64 * @slew_rate_uV_per_us: Slew rate microvolt per microsec.
65 */
66
67struct tps6591x_regulator_platform_data {
68 struct regulator_init_data regulator;
69 int init_uV;
70 unsigned init_enable:1;
71 unsigned init_apply:1;
72 enum tps6591x_ext_control ectrl;
73 int slew_rate_uV_per_us;
74 unsigned int flags;
75};
76
77#endif /* __REGULATOR_TPS6591X_H */