aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:24:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:24:07 -0500
commit1896a1346a80b2dac1f63a338f1e2ee0b6484646 (patch)
tree825b59dd33886398f541488d2b5eb65cbd353bdb /arch/arm
parente691d24e9c5007486bef59c589c2a2d784e0c30b (diff)
parentfa63bd4aa53aecc38956cbdd50f8ff9ed0d6d5ba (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (45 commits) regulator: missing index in PTR_ERR() in isl6271a_probe() regulator: Assign return value of mc13xxx_reg_rmw to ret regulator: Add initial per-regulator debugfs support regulator: Make regulator_has_full_constraints a bool regulator: Clean up logging a bit regulator: Optimise out noop voltage changes regulator: Add API to re-apply voltage to hardware regulator: Staticise non-exported functions in mc13892 regulator: Only notify voltage changes when they succeed regulator: Provide a selector based set_voltage_sel() operation regulator: Factor out voltage set operation into a separate function regulator: Convert WM8994 to use get_voltage_sel() regulator: Convert WM835x to use get_voltage_sel() regulator: Allow modular build of mc13xxx-core regulator: support PMIC mc13892 make mc13783 regulator code generic Change the register name definitions for mc13783 mach-ux500: Updated and connected ab8500 regulator board configuration regulators: Removed macros for initialization of ab8500 regulators regulators: Added verbose debug messages to ab8500 regulators ...
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-imx/mach-pcm038.c4
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c4
-rw-r--r--arch/arm/mach-mx3/mach-mx31moboard.c4
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c153
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h19
-rw-r--r--arch/arm/mach-ux500/board-mop500.c3
6 files changed, 102 insertions, 85 deletions
diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c
index f667a262dfc1..505614803bc6 100644
--- a/arch/arm/mach-imx/mach-pcm038.c
+++ b/arch/arm/mach-imx/mach-pcm038.c
@@ -254,10 +254,10 @@ static struct regulator_init_data cam_data = {
254 254
255static struct mc13783_regulator_init_data pcm038_regulators[] = { 255static struct mc13783_regulator_init_data pcm038_regulators[] = {
256 { 256 {
257 .id = MC13783_REGU_VCAM, 257 .id = MC13783_REG_VCAM,
258 .init_data = &cam_data, 258 .init_data = &cam_data,
259 }, { 259 }, {
260 .id = MC13783_REGU_VMMC1, 260 .id = MC13783_REG_VMMC1,
261 .init_data = &sdhc1_data, 261 .init_data = &sdhc1_data,
262 }, 262 },
263}; 263};
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 4e516b49a901..899a969e92fa 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -140,10 +140,10 @@ static struct regulator_init_data gpo_init = {
140 140
141static struct mc13783_regulator_init_data mx31_3ds_regulators[] = { 141static struct mc13783_regulator_init_data mx31_3ds_regulators[] = {
142 { 142 {
143 .id = MC13783_REGU_PWGT1SPI, /* Power Gate for ARM core. */ 143 .id = MC13783_REG_PWGT1SPI, /* Power Gate for ARM core. */
144 .init_data = &pwgtx_init, 144 .init_data = &pwgtx_init,
145 }, { 145 }, {
146 .id = MC13783_REGU_PWGT2SPI, /* Power Gate for L2 Cache. */ 146 .id = MC13783_REG_PWGT2SPI, /* Power Gate for L2 Cache. */
147 .init_data = &pwgtx_init, 147 .init_data = &pwgtx_init,
148 }, { 148 }, {
149 149
diff --git a/arch/arm/mach-mx3/mach-mx31moboard.c b/arch/arm/mach-mx3/mach-mx31moboard.c
index 203d21a510aa..1aa8d65fccbb 100644
--- a/arch/arm/mach-mx3/mach-mx31moboard.c
+++ b/arch/arm/mach-mx3/mach-mx31moboard.c
@@ -216,11 +216,11 @@ static struct regulator_init_data cam_vreg_data = {
216 216
217static struct mc13783_regulator_init_data moboard_regulators[] = { 217static struct mc13783_regulator_init_data moboard_regulators[] = {
218 { 218 {
219 .id = MC13783_REGU_VMMC1, 219 .id = MC13783_REG_VMMC1,
220 .init_data = &sdhc_vreg_data, 220 .init_data = &sdhc_vreg_data,
221 }, 221 },
222 { 222 {
223 .id = MC13783_REGU_VCAM, 223 .id = MC13783_REG_VCAM,
224 .init_data = &cam_vreg_data, 224 .init_data = &cam_vreg_data,
225 }, 225 },
226}; 226};
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 1187f1fc2e53..533967c2d095 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -3,99 +3,94 @@
3 * 3 *
4 * License Terms: GNU General Public License v2 4 * License Terms: GNU General Public License v2
5 * 5 *
6 * Author: Sundar Iyer <sundar.iyer@stericsson.com> 6 * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
7 * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
7 * 8 *
8 * MOP500 board specific initialization for regulators 9 * MOP500 board specific initialization for regulators
9 */ 10 */
10#include <linux/kernel.h> 11#include <linux/kernel.h>
11#include <linux/regulator/machine.h> 12#include <linux/regulator/machine.h>
13#include <linux/regulator/ab8500.h>
12 14
13/* supplies to the display/camera */ 15/* AB8500 regulators */
14static struct regulator_init_data ab8500_vaux1_regulator = { 16struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
15 .constraints = { 17 /* supplies to the display/camera */
16 .name = "V-DISPLAY", 18 [AB8500_LDO_AUX1] = {
17 .min_uV = 2500000, 19 .constraints = {
18 .max_uV = 2900000, 20 .name = "V-DISPLAY",
19 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| 21 .min_uV = 2500000,
20 REGULATOR_CHANGE_STATUS, 22 .max_uV = 2900000,
23 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
24 REGULATOR_CHANGE_STATUS,
25 },
21 }, 26 },
22}; 27 /* supplies to the on-board eMMC */
23 28 [AB8500_LDO_AUX2] = {
24/* supplies to the on-board eMMC */ 29 .constraints = {
25static struct regulator_init_data ab8500_vaux2_regulator = { 30 .name = "V-eMMC1",
26 .constraints = { 31 .min_uV = 1100000,
27 .name = "V-eMMC1", 32 .max_uV = 3300000,
28 .min_uV = 1100000, 33 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
29 .max_uV = 3300000, 34 REGULATOR_CHANGE_STATUS,
30 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| 35 },
31 REGULATOR_CHANGE_STATUS,
32 }, 36 },
33}; 37 /* supply for VAUX3, supplies to SDcard slots */
34 38 [AB8500_LDO_AUX3] = {
35/* supply for VAUX3, supplies to SDcard slots */ 39 .constraints = {
36static struct regulator_init_data ab8500_vaux3_regulator = { 40 .name = "V-MMC-SD",
37 .constraints = { 41 .min_uV = 1100000,
38 .name = "V-MMC-SD", 42 .max_uV = 3300000,
39 .min_uV = 1100000, 43 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
40 .max_uV = 3300000, 44 REGULATOR_CHANGE_STATUS,
41 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE| 45 },
42 REGULATOR_CHANGE_STATUS,
43 }, 46 },
44}; 47 /* supply for tvout, gpadc, TVOUT LDO */
45 48 [AB8500_LDO_TVOUT] = {
46/* supply for tvout, gpadc, TVOUT LDO */ 49 .constraints = {
47static struct regulator_init_data ab8500_vtvout_init = { 50 .name = "V-TVOUT",
48 .constraints = { 51 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
49 .name = "V-TVOUT", 52 },
50 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
51 }, 53 },
52}; 54 /* supply for ab8500-vaudio, VAUDIO LDO */
53 55 [AB8500_LDO_AUDIO] = {
54/* supply for ab8500-vaudio, VAUDIO LDO */ 56 .constraints = {
55static struct regulator_init_data ab8500_vaudio_init = { 57 .name = "V-AUD",
56 .constraints = { 58 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
57 .name = "V-AUD", 59 },
58 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
59 }, 60 },
60}; 61 /* supply for v-anamic1 VAMic1-LDO */
61 62 [AB8500_LDO_ANAMIC1] = {
62/* supply for v-anamic1 VAMic1-LDO */ 63 .constraints = {
63static struct regulator_init_data ab8500_vamic1_init = { 64 .name = "V-AMIC1",
64 .constraints = { 65 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
65 .name = "V-AMIC1", 66 },
66 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
67 }, 67 },
68}; 68 /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
69 69 [AB8500_LDO_ANAMIC2] = {
70/* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */ 70 .constraints = {
71static struct regulator_init_data ab8500_vamic2_init = { 71 .name = "V-AMIC2",
72 .constraints = { 72 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
73 .name = "V-AMIC2", 73 },
74 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
75 }, 74 },
76}; 75 /* supply for v-dmic, VDMIC LDO */
77 76 [AB8500_LDO_DMIC] = {
78/* supply for v-dmic, VDMIC LDO */ 77 .constraints = {
79static struct regulator_init_data ab8500_vdmic_init = { 78 .name = "V-DMIC",
80 .constraints = { 79 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
81 .name = "V-DMIC", 80 },
82 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
83 }, 81 },
84}; 82 /* supply for v-intcore12, VINTCORE12 LDO */
85 83 [AB8500_LDO_INTCORE] = {
86/* supply for v-intcore12, VINTCORE12 LDO */ 84 .constraints = {
87static struct regulator_init_data ab8500_vintcore_init = { 85 .name = "V-INTCORE",
88 .constraints = { 86 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
89 .name = "V-INTCORE", 87 },
90 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
91 }, 88 },
92}; 89 /* supply for U8500 CSI/DSI, VANA LDO */
93 90 [AB8500_LDO_ANA] = {
94/* supply for U8500 CSI/DSI, VANA LDO */ 91 .constraints = {
95static struct regulator_init_data ab8500_vana_init = { 92 .name = "V-CSI/DSI",
96 .constraints = { 93 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
97 .name = "V-CSI/DSI", 94 },
98 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
99 }, 95 },
100}; 96};
101
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
new file mode 100644
index 000000000000..2675fae52537
--- /dev/null
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -0,0 +1,19 @@
1/*
2 * Copyright (C) ST-Ericsson SA 2010
3 *
4 * License Terms: GNU General Public License v2
5 *
6 * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
7 *
8 * MOP500 board specific initialization for regulators
9 */
10
11#ifndef __BOARD_MOP500_REGULATORS_H
12#define __BOARD_MOP500_REGULATORS_H
13
14#include <linux/regulator/machine.h>
15#include <linux/regulator/ab8500.h>
16
17extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
18
19#endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a1c9ea1a66df..a393f57ed2a8 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -35,6 +35,7 @@
35#include "devices-db8500.h" 35#include "devices-db8500.h"
36#include "pins-db8500.h" 36#include "pins-db8500.h"
37#include "board-mop500.h" 37#include "board-mop500.h"
38#include "board-mop500-regulators.h"
38 39
39static pin_cfg_t mop500_pins[] = { 40static pin_cfg_t mop500_pins[] = {
40 /* SSP0 */ 41 /* SSP0 */
@@ -80,6 +81,8 @@ static pin_cfg_t mop500_pins[] = {
80 81
81static struct ab8500_platform_data ab8500_platdata = { 82static struct ab8500_platform_data ab8500_platdata = {
82 .irq_base = MOP500_AB8500_IRQ_BASE, 83 .irq_base = MOP500_AB8500_IRQ_BASE,
84 .regulator = ab8500_regulators,
85 .num_regulator = ARRAY_SIZE(ab8500_regulators),
83}; 86};
84 87
85static struct resource ab8500_resources[] = { 88static struct resource ab8500_resources[] = {