aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /include/linux/regulator
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/bq24022.h24
-rw-r--r--include/linux/regulator/fan53555-regulator.h63
-rw-r--r--include/linux/regulator/gpio-switch-regulator.h69
-rw-r--r--include/linux/regulator/max77663-regulator.h131
-rw-r--r--include/linux/regulator/max8907c-regulator.h46
-rw-r--r--include/linux/regulator/ricoh583-regulator.h63
-rw-r--r--include/linux/regulator/tps6236x-regulator.h54
-rw-r--r--include/linux/regulator/tps65090-regulator.h60
-rw-r--r--include/linux/regulator/tps6591x-regulator.h77
-rw-r--r--include/linux/regulator/tps80031-regulator.h89
10 files changed, 676 insertions, 0 deletions
diff --git a/include/linux/regulator/bq24022.h b/include/linux/regulator/bq24022.h
new file mode 100644
index 00000000000..a6d014005d4
--- /dev/null
+++ b/include/linux/regulator/bq24022.h
@@ -0,0 +1,24 @@
1/*
2 * Support for TI bq24022 (bqTINY-II) Dual Input (USB/AC Adpater)
3 * 1-Cell Li-Ion Charger connected via GPIOs.
4 *
5 * Copyright (c) 2008 Philipp Zabel
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 version 2 as
9 * published by the Free Software Foundation.
10 *
11 */
12
13struct regulator_init_data;
14
15/**
16 * bq24022_mach_info - platform data for bq24022
17 * @gpio_nce: GPIO line connected to the nCE pin, used to enable / disable charging
18 * @gpio_iset2: GPIO line connected to the ISET2 pin, used to limit charging current to 100 mA / 500 mA
19 */
20struct bq24022_mach_info {
21 int gpio_nce;
22 int gpio_iset2;
23 struct regulator_init_data *init_data;
24};
diff --git a/include/linux/regulator/fan53555-regulator.h b/include/linux/regulator/fan53555-regulator.h
new file mode 100644
index 00000000000..e2ed83bab4e
--- /dev/null
+++ b/include/linux/regulator/fan53555-regulator.h
@@ -0,0 +1,63 @@
1/*
2 * include/linux/regulator/fan53555.h
3 *
4 * Interface for regulator driver for FairChild fan53555 Processor power supply
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_FAN53555_H
25#define __REGULATOR_FAN53555_H
26
27#include <linux/regulator/machine.h>
28
29/*
30 * struct fan53555_regulator_platform_data - fan53555 regulator platform data.
31 * When VSEL pin is low, VOUT is set by the VSEL0 register.
32 * When VSEL pin is high, VOUT is set by the VSEL1 register
33 *
34 * @reg_init_data: The regulator init data.
35 * @vsel_id: Select the voltage id register.
36 * @vsel0_buck_en: Software Buck enable when EN=high & VSEL=low
37 * @vsel0_mode: Force PWM mode(1) or Allow auto-PFM mode(0) during light load
38 * @init_vsel0_min_uV: initial micro volts when EN=high & VSEL=low
39 * @init_vsel0_max_uV: initial micro volts when EN=high & VSEL=low
40 * @vsel1_buck_en: Software Buck enable when EN=high & VSEL=high
41 * @vsel1_mode: Force PWM mode(1) or Allow auto-PFM mode(0) during light load
42 * @init_vsel1_min_uV: initial micro volts when EN=high & VSEL=high
43 * @init_vsel1_max_uV: initial micro volts when EN=high & VSEL=high
44 * @output_discharge: when the regulator is disabled, VOUT discharges
45 * @slew_rate: slew rate of trasitioning from a low to high voltage
46 */
47
48struct fan53555_regulator_platform_data {
49 struct regulator_init_data reg_init_data;
50 int vsel_id;
51 unsigned vsel0_buck_en:1;
52 unsigned vsel0_mode:1;
53 int init_vsel0_min_uV;
54 int init_vsel0_max_uV;
55 unsigned vsel1_buck_en:1;
56 unsigned vsel1_mode:1;
57 int init_vsel1_min_uV;
58 int init_vsel1_max_uV;
59 unsigned output_discharge:1;
60 unsigned slew_rate:3;
61};
62
63#endif /* __REGULATOR_FAN53555_H */
diff --git a/include/linux/regulator/gpio-switch-regulator.h b/include/linux/regulator/gpio-switch-regulator.h
new file mode 100644
index 00000000000..68776b93ef0
--- /dev/null
+++ b/include/linux/regulator/gpio-switch-regulator.h
@@ -0,0 +1,69 @@
1/*
2 * Copyright (c) 2011, NVIDIA Corporation.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef _GPIO_SWITCH_REGULATOR_H
20#define _GPIO_SWITCH_REGULATOR_H
21
22#include <linux/regulator/machine.h>
23
24/*
25 * struct gpio_switch_regulator_subdev_data - Gpio switch regulator subdevice
26 * data.
27 *
28 * Subdevice data to register a gpio regulator switch device driver.
29 *
30 * @regulator_name: The name of regulator.
31 * @input_supply: Input supply name.
32 * @id: The id of the switch.
33 * @gpio_nr: Gpio nr which controls this switch.
34 * @active_low: true if making gpio low makes voltage output enable.
35 * @init_state: 1 if init_state should be active.
36 * @voltages: Possible voltages to set at output. The values are in millivolt.
37 * @n_voltages: Number of voltages.
38 * @num_consumer_supplies: Number of cosumer supplies.
39 * @consumer_supplies: List of consumer spllies.
40 */
41struct gpio_switch_regulator_subdev_data {
42 const char *regulator_name;
43 const char *input_supply;
44 int id;
45 int gpio_nr;
46 int active_low;
47 int pin_group;
48 int init_state;
49 int *voltages;
50 unsigned n_voltages;
51 struct regulator_consumer_supply *consumer_supplies;
52 int num_consumer_supplies;
53 struct regulation_constraints constraints;
54 int (*enable_rail)(struct gpio_switch_regulator_subdev_data *pdata);
55 int (*disable_rail)(struct gpio_switch_regulator_subdev_data *pdata);
56
57};
58
59/**
60 * gpio_switch_regulator_platform_data - platform data for gpio_switch_regulator
61 * @num_subdevs: number of regulators used
62 * @subdevs: pointer to regulators used
63 */
64struct gpio_switch_regulator_platform_data {
65 int num_subdevs;
66 struct gpio_switch_regulator_subdev_data **subdevs;
67};
68
69#endif
diff --git a/include/linux/regulator/max77663-regulator.h b/include/linux/regulator/max77663-regulator.h
new file mode 100644
index 00000000000..d8ab389c425
--- /dev/null
+++ b/include/linux/regulator/max77663-regulator.h
@@ -0,0 +1,131 @@
1/*
2 * include/linux/regulator/max77663-regulator.h
3 * Maxim LDO and Buck regulators driver
4 *
5 * Copyright 2011-2012 Maxim Integrated Products, Inc.
6 * Copyright (C) 2011-2012 NVIDIA Corporation
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
12 *
13 */
14
15#ifndef __LINUX_REGULATOR_MAX77663_REGULATOR_H__
16#define __LINUX_REGULATOR_MAX77663_REGULATOR_H__
17
18#include <linux/regulator/machine.h>
19
20#define max77663_rails(_name) "max77663_"#_name
21
22enum max77663_regulator_id {
23 MAX77663_REGULATOR_ID_SD0,
24 MAX77663_REGULATOR_ID_DVSSD0,
25 MAX77663_REGULATOR_ID_SD1,
26 MAX77663_REGULATOR_ID_DVSSD1,
27 MAX77663_REGULATOR_ID_SD2,
28 MAX77663_REGULATOR_ID_SD3,
29 MAX77663_REGULATOR_ID_SD4,
30 MAX77663_REGULATOR_ID_LDO0,
31 MAX77663_REGULATOR_ID_LDO1,
32 MAX77663_REGULATOR_ID_LDO2,
33 MAX77663_REGULATOR_ID_LDO3,
34 MAX77663_REGULATOR_ID_LDO4,
35 MAX77663_REGULATOR_ID_LDO5,
36 MAX77663_REGULATOR_ID_LDO6,
37 MAX77663_REGULATOR_ID_LDO7,
38 MAX77663_REGULATOR_ID_LDO8,
39 MAX77663_REGULATOR_ID_NR,
40};
41
42/* FPS Power Up/Down Period */
43enum max77663_regulator_fps_power_period {
44 FPS_POWER_PERIOD_0,
45 FPS_POWER_PERIOD_1,
46 FPS_POWER_PERIOD_2,
47 FPS_POWER_PERIOD_3,
48 FPS_POWER_PERIOD_4,
49 FPS_POWER_PERIOD_5,
50 FPS_POWER_PERIOD_6,
51 FPS_POWER_PERIOD_7,
52 FPS_POWER_PERIOD_DEF = -1,
53};
54
55/* FPS Time Period */
56enum max77663_regulator_fps_time_period {
57 FPS_TIME_PERIOD_20US,
58 FPS_TIME_PERIOD_40US,
59 FPS_TIME_PERIOD_80US,
60 FPS_TIME_PERIOD_160US,
61 FPS_TIME_PERIOD_320US,
62 FPS_TIME_PERIOD_640US,
63 FPS_TIME_PERIOD_1280US,
64 FPS_TIME_PERIOD_2560US,
65 FPS_TIME_PERIOD_DEF = -1,
66};
67
68/* FPS Enable Source */
69enum max77663_regulator_fps_en_src {
70 FPS_EN_SRC_EN0,
71 FPS_EN_SRC_EN1,
72 FPS_EN_SRC_SW,
73 FPS_EN_SRC_RSVD,
74};
75
76/* FPS Source */
77enum max77663_regulator_fps_src {
78 FPS_SRC_0,
79 FPS_SRC_1,
80 FPS_SRC_2,
81 FPS_SRC_NONE,
82 FPS_SRC_DEF = -1,
83};
84
85/*
86 * Flags
87 */
88/* SD0 is controlled by EN2 */
89#define EN2_CTRL_SD0 0x01
90
91/* SD Slew Rate */
92#define SD_SLEW_RATE_SLOWEST 0x02 /* 13.75mV/us */
93#define SD_SLEW_RATE_SLOW 0x04 /* 27.50mV/us */
94#define SD_SLEW_RATE_FAST 0x08 /* 55.00mV/us */
95#define SD_SLEW_RATE_FASTEST 0x10 /* 100.00mV/us */
96#define SD_SLEW_RATE_MASK 0x1E
97
98/* SD Forced PWM Mode */
99#define SD_FORCED_PWM_MODE 0x20
100
101/* SD Failling Slew Rate Active-Discharge Mode */
102#define SD_FSRADE_DISABLE 0x40
103
104/* Group Low-Power Mode */
105#define GLPM_ENABLE 0x80
106
107/* Tracking for LDO4 */
108#define LDO4_EN_TRACKING 0x100
109
110struct max77663_regulator_fps_cfg {
111 enum max77663_regulator_fps_src src;
112 enum max77663_regulator_fps_en_src en_src;
113 enum max77663_regulator_fps_time_period time_period;
114};
115
116struct max77663_regulator_platform_data {
117 struct regulator_init_data init_data;
118 bool init_apply;
119 bool init_enable;
120 int init_uV;
121 enum max77663_regulator_fps_src fps_src;
122 enum max77663_regulator_fps_power_period fps_pu_period;
123 enum max77663_regulator_fps_power_period fps_pd_period;
124
125 int num_fps_cfgs;
126 struct max77663_regulator_fps_cfg *fps_cfgs;
127
128 unsigned int flags;
129};
130
131#endif /* __LINUX_REGULATOR_MAX77663_REGULATOR_H__ */
diff --git a/include/linux/regulator/max8907c-regulator.h b/include/linux/regulator/max8907c-regulator.h
new file mode 100644
index 00000000000..ddc5f0a6033
--- /dev/null
+++ b/include/linux/regulator/max8907c-regulator.h
@@ -0,0 +1,46 @@
1/* linux/regulator/max8907c-regulator.h
2 *
3 * Functions to access MAX8907C power management chip.
4 *
5 * Copyright (C) 2010 Gyungoh Yoo <jack.yoo@maxim-ic.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 version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __LINUX_REGULATOR_MAX8907C_H
13#define __LINUX_REGULATOR_MAX8907C_H
14
15/* IDs */
16#define MAX8907C_SD1 0
17#define MAX8907C_SD2 1
18#define MAX8907C_SD3 2
19#define MAX8907C_LDO1 3
20#define MAX8907C_LDO2 4
21#define MAX8907C_LDO3 5
22#define MAX8907C_LDO4 6
23#define MAX8907C_LDO5 7
24#define MAX8907C_LDO6 8
25#define MAX8907C_LDO7 9
26#define MAX8907C_LDO8 10
27#define MAX8907C_LDO9 11
28#define MAX8907C_LDO10 12
29#define MAX8907C_LDO11 13
30#define MAX8907C_LDO12 14
31#define MAX8907C_LDO13 15
32#define MAX8907C_LDO14 16
33#define MAX8907C_LDO15 17
34#define MAX8907C_LDO16 18
35#define MAX8907C_LDO17 19
36#define MAX8907C_LDO18 20
37#define MAX8907C_LDO19 21
38#define MAX8907C_LDO20 22
39#define MAX8907C_OUT5V 23
40#define MAX8907C_OUT33V 24
41#define MAX8907C_BBAT 25
42#define MAX8907C_SDBY 26
43#define MAX8907C_VRTC 27
44#define MAX8907C_WLED 27
45
46#endif
diff --git a/include/linux/regulator/ricoh583-regulator.h b/include/linux/regulator/ricoh583-regulator.h
new file mode 100644
index 00000000000..39fdb9e56e0
--- /dev/null
+++ b/include/linux/regulator/ricoh583-regulator.h
@@ -0,0 +1,63 @@
1/*
2 * linux/regulator/ricoh583-regulator.h
3 *
4 * Interface for regulator driver for RICOH583 power management chip.
5 *
6 * Copyright (C) 2011 NVIDIA Corporation
7 *
8 * Copyright (C) 2011 RICOH COMPANY,LTD
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_RICOH583_H
27#define __LINUX_REGULATOR_RICOH583_H
28
29#include <linux/regulator/machine.h>
30
31
32#define ricoh583_rails(_name) "RICOH583_"#_name
33
34/* RICHOH Regulator IDs */
35enum regulator_id {
36 RICOH583_ID_DC0,
37 RICOH583_ID_DC1,
38 RICOH583_ID_DC2,
39 RICOH583_ID_DC3,
40 RICOH583_ID_LDO0,
41 RICOH583_ID_LDO1,
42 RICOH583_ID_LDO2,
43 RICOH583_ID_LDO3,
44 RICOH583_ID_LDO4,
45 RICOH583_ID_LDO5,
46 RICOH583_ID_LDO6,
47 RICOH583_ID_LDO7,
48 RICOH583_ID_LDO8,
49 RICOH583_ID_LDO9,
50};
51
52struct ricoh583_regulator_platform_data {
53 struct regulator_init_data regulator;
54 int init_uV;
55 unsigned init_enable:1;
56 unsigned init_apply:1;
57 int deepsleep_uV;
58 int deepsleep_slots;
59 unsigned long ext_pwr_req;
60 unsigned long flags;
61};
62
63#endif
diff --git a/include/linux/regulator/tps6236x-regulator.h b/include/linux/regulator/tps6236x-regulator.h
new file mode 100644
index 00000000000..7e8a3752966
--- /dev/null
+++ b/include/linux/regulator/tps6236x-regulator.h
@@ -0,0 +1,54 @@
1/*
2 * include/linux/regulator/tps6236x.h
3 *
4 * Interface for regulator driver for TI TPS6236x Processor core supply
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_TPS6236X_H
25#define __REGULATOR_TPS6236X_H
26
27#include <linux/regulator/machine.h>
28
29/*
30 * struct tps6236x_regulator_platform_data - tps6236x regulator platform data.
31 *
32 * @reg_init_data: The regulator init data.
33 * @internal_pd_enable: internal pull down enable or not.
34 * @vsel: Select the voltage id register.
35 * @init_uV: initial micro volts which need to be set.
36 * @init_enable: Enable or do not enable the rails during initialization.
37 * @init_apply: Init parameter applied or not.
38 * @is_force_pwm: Enable force pwm or not. If not then PFM mode configuration
39 * will be used.
40 * @enable_discharge: Enable discharge the output capacitor via a typ. 300Ohm
41 * path
42 */
43
44struct tps6236x_regulator_platform_data {
45 struct regulator_init_data reg_init_data;
46 int internal_pd_enable;
47 int vsel;
48 int init_uV;
49 unsigned init_apply:1;
50 bool is_force_pwm;
51 bool enable_discharge;
52};
53
54#endif /* __REGULATOR_TPS6236X_H */
diff --git a/include/linux/regulator/tps65090-regulator.h b/include/linux/regulator/tps65090-regulator.h
new file mode 100644
index 00000000000..341d53ec994
--- /dev/null
+++ b/include/linux/regulator/tps65090-regulator.h
@@ -0,0 +1,60 @@
1/*
2 * include/linux/regulator/tps65090-regulator.h
3 *
4 * Interface for regulator driver for TI TPS65090 PMIC family
5 *
6 * Copyright (C) 2012 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 Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *
22 */
23
24#ifndef __REGULATOR_TPS65090_H
25#define __REGULATOR_TPS65090_H
26
27#include <linux/regulator/machine.h>
28
29#define tps65090_rails(_name) "tps65090_"#_name
30
31enum {
32 TPS65090_ID_DCDC1,
33 TPS65090_ID_DCDC2,
34 TPS65090_ID_DCDC3,
35 TPS65090_ID_FET1,
36 TPS65090_ID_FET2,
37 TPS65090_ID_FET3,
38 TPS65090_ID_FET4,
39 TPS65090_ID_FET5,
40 TPS65090_ID_FET6,
41 TPS65090_ID_FET7,
42};
43
44/*
45 * struct tps65090_regulator_platform_data
46 *
47 * @regulator: The regulator init data.
48 * @init_uV: initial micro volts which need to be set.
49 * @init_enable: Enable or do not enable the rails during initialization.
50 * @init_apply: Init parameter applied or not.
51 * @slew_rate_uV_per_us: Slew rate microvolt per microsec.
52 */
53
54struct tps65090_regulator_platform_data {
55 struct regulator_init_data regulator;
56 int slew_rate_uV_per_us;
57 unsigned int flags;
58};
59
60#endif /* __REGULATOR_TPS65090_H */
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 */
diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h
new file mode 100644
index 00000000000..1670d147fc3
--- /dev/null
+++ b/include/linux/regulator/tps80031-regulator.h
@@ -0,0 +1,89 @@
1/*
2 * include/linux/regulator/tps80031-regulator.h
3 *
4 * Interface for regulator driver for TI TPS80031
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_TPS80031_H
25#define __REGULATOR_TPS80031_H
26
27#include <linux/regulator/machine.h>
28
29#define tps80031_rails(_name) "tps80031_"#_name
30
31enum {
32 TPS80031_ID_VIO,
33 TPS80031_ID_SMPS1,
34 TPS80031_ID_SMPS2,
35 TPS80031_ID_SMPS3,
36 TPS80031_ID_SMPS4,
37 TPS80031_ID_VANA,
38 TPS80031_ID_LDO1,
39 TPS80031_ID_LDO2,
40 TPS80031_ID_LDO3,
41 TPS80031_ID_LDO4,
42 TPS80031_ID_LDO5,
43 TPS80031_ID_LDO6,
44 TPS80031_ID_LDO7,
45 TPS80031_ID_LDOLN,
46 TPS80031_ID_LDOUSB,
47 TPS80031_ID_VBUS,
48 TPS80031_ID_CHARGER,
49};
50
51
52enum {
53 /* USBLDO input selection */
54 USBLDO_INPUT_VSYS = 0x00000001,
55 USBLDO_INPUT_PMID = 0x00000002,
56
57 /* LDO3 output mode */
58 LDO3_OUTPUT_VIB = 0x00000004,
59
60 /* VBUS configuration */
61 VBUS_DISCHRG_EN_PDN = 0x00000004,
62 VBUS_SW_ONLY = 0x00000008,
63 VBUS_SW_N_ID = 0x00000010,
64};
65
66/*
67 * struct tps80031_regulator_platform_data - tps80031 regulator platform data.
68 *
69 * @regulator: The regulator init data.
70 * @init_uV: initial micro volts which need to be set.
71 * @init_enable: Enable or do not enable the rails during initialization.
72 * @init_apply: Init parameter applied or not.
73 * @ext_ctrl_flag: External control flag for sleep/power request control.
74 * @flags: Configuration flag to configure the rails. It should be ORed of
75 * above enums.
76 * @delay_us: Delay in microsecond after setting the desired voltage.
77 */
78
79struct tps80031_regulator_platform_data {
80 struct regulator_init_data regulator;
81 int init_uV;
82 unsigned init_enable:1;
83 unsigned init_apply:1;
84 unsigned int ext_ctrl_flag;
85 unsigned int flags;
86 int delay_us;
87};
88
89#endif /* __REGULATOR_TPS80031_H */