aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/tps65910.h7
-rw-r--r--include/linux/regulator/driver.h6
-rw-r--r--include/linux/regulator/tps62360.h57
3 files changed, 66 insertions, 4 deletions
diff --git a/include/linux/mfd/tps65910.h b/include/linux/mfd/tps65910.h
index d0cb12eba402..76700b5eee92 100644
--- a/include/linux/mfd/tps65910.h
+++ b/include/linux/mfd/tps65910.h
@@ -768,6 +768,12 @@
768/* Max number of TPS65910/11 regulators */ 768/* Max number of TPS65910/11 regulators */
769#define TPS65910_NUM_REGS 13 769#define TPS65910_NUM_REGS 13
770 770
771/* External sleep controls through EN1/EN2/EN3/SLEEP inputs */
772#define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN1 0x1
773#define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN2 0x2
774#define TPS65910_SLEEP_CONTROL_EXT_INPUT_EN3 0x4
775#define TPS65911_SLEEP_CONTROL_EXT_INPUT_SLEEP 0x8
776
771/** 777/**
772 * struct tps65910_board 778 * struct tps65910_board
773 * Board platform data may be used to initialize regulators. 779 * Board platform data may be used to initialize regulators.
@@ -779,6 +785,7 @@ struct tps65910_board {
779 int irq_base; 785 int irq_base;
780 int vmbch_threshold; 786 int vmbch_threshold;
781 int vmbch2_threshold; 787 int vmbch2_threshold;
788 unsigned long regulator_ext_sleep_control[TPS65910_NUM_REGS];
782 struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS]; 789 struct regulator_init_data *tps65910_pmic_init_data[TPS65910_NUM_REGS];
783}; 790};
784 791
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 4214b9a9d1c9..fa8b55b8191c 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -104,7 +104,7 @@ struct regulator_ops {
104 int (*disable) (struct regulator_dev *); 104 int (*disable) (struct regulator_dev *);
105 int (*is_enabled) (struct regulator_dev *); 105 int (*is_enabled) (struct regulator_dev *);
106 106
107 /* get/set regulator operating mode (defined in regulator.h) */ 107 /* get/set regulator operating mode (defined in consumer.h) */
108 int (*set_mode) (struct regulator_dev *, unsigned int mode); 108 int (*set_mode) (struct regulator_dev *, unsigned int mode);
109 unsigned int (*get_mode) (struct regulator_dev *); 109 unsigned int (*get_mode) (struct regulator_dev *);
110 110
@@ -135,7 +135,7 @@ struct regulator_ops {
135 int (*set_suspend_enable) (struct regulator_dev *); 135 int (*set_suspend_enable) (struct regulator_dev *);
136 int (*set_suspend_disable) (struct regulator_dev *); 136 int (*set_suspend_disable) (struct regulator_dev *);
137 137
138 /* set regulator suspend operating mode (defined in regulator.h) */ 138 /* set regulator suspend operating mode (defined in consumer.h) */
139 int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode); 139 int (*set_suspend_mode) (struct regulator_dev *, unsigned int mode);
140}; 140};
141 141
@@ -207,9 +207,7 @@ struct regulator_dev {
207 207
208 void *reg_data; /* regulator_dev data */ 208 void *reg_data; /* regulator_dev data */
209 209
210#ifdef CONFIG_DEBUG_FS
211 struct dentry *debugfs; 210 struct dentry *debugfs;
212#endif
213}; 211};
214 212
215struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 213struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
diff --git a/include/linux/regulator/tps62360.h b/include/linux/regulator/tps62360.h
new file mode 100644
index 000000000000..6a5c1b2c751e
--- /dev/null
+++ b/include/linux/regulator/tps62360.h
@@ -0,0 +1,57 @@
1/*
2 * tps62360.h -- TI tps62360
3 *
4 * Interface for regulator driver for TI TPS62360 Processor core supply
5 *
6 * Copyright (C) 2012 NVIDIA Corporation
7
8 * Author: Laxman Dewangan <ldewangan@nvidia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 * more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 *
24 */
25
26#ifndef __LINUX_REGULATOR_TPS62360_H
27#define __LINUX_REGULATOR_TPS62360_H
28
29#include <linux/regulator/machine.h>
30
31/*
32 * struct tps62360_regulator_platform_data - tps62360 regulator platform data.
33 *
34 * @reg_init_data: The regulator init data.
35 * @en_force_pwm: Enable force pwm or not.
36 * @en_discharge: Enable discharge the output capacitor via internal
37 * register.
38 * @en_internal_pulldn: internal pull down enable or not.
39 * @vsel0_gpio: Gpio number for vsel0. It should be -1 if this is tied with
40 * fixed logic.
41 * @vsel1_gpio: Gpio number for vsel1. It should be -1 if this is tied with
42 * fixed logic.
43 * @vsel0_def_state: Default state of vsel0. 1 if it is high else 0.
44 * @vsel1_def_state: Default state of vsel1. 1 if it is high else 0.
45 */
46struct tps62360_regulator_platform_data {
47 struct regulator_init_data reg_init_data;
48 bool en_force_pwm;
49 bool en_discharge;
50 bool en_internal_pulldn;
51 int vsel0_gpio;
52 int vsel1_gpio;
53 int vsel0_def_state;
54 int vsel1_def_state;
55};
56
57#endif /* __LINUX_REGULATOR_TPS62360_H */