Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
c98cac89
Commit
c98cac89
authored
Apr 28, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/ab8500' into v3.9-rc8
parents
9e63d230
5d9de8b1
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
3917 additions
and
294 deletions
+3917
-294
arch/arm/mach-ux500/board-mop500-regulators.c
arch/arm/mach-ux500/board-mop500-regulators.c
+714
-60
arch/arm/mach-ux500/board-mop500-regulators.h
arch/arm/mach-ux500/board-mop500-regulators.h
+4
-3
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.c
+1
-4
drivers/regulator/Makefile
drivers/regulator/Makefile
+1
-1
drivers/regulator/ab8500-ext.c
drivers/regulator/ab8500-ext.c
+407
-0
drivers/regulator/ab8500.c
drivers/regulator/ab8500.c
+2579
-207
drivers/regulator/dbx500-prcmu.h
drivers/regulator/dbx500-prcmu.h
+0
-2
include/linux/mfd/abx500/ab8500.h
include/linux/mfd/abx500/ab8500.h
+2
-9
include/linux/regulator/ab8500.h
include/linux/regulator/ab8500.h
+209
-8
No files found.
arch/arm/mach-ux500/board-mop500-regulators.c
View file @
c98cac89
This diff is collapsed.
Click to expand it.
arch/arm/mach-ux500/board-mop500-regulators.h
View file @
c98cac89
...
...
@@ -14,10 +14,11 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/ab8500.h>
extern
struct
ab8500_regulator_reg_init
ab8500_regulator_reg_init
[
AB8500_NUM_REGULATOR_REGISTERS
];
extern
struct
regulator_init_data
ab8500_regulators
[
AB8500_NUM_REGULATORS
];
extern
struct
ab8500_regulator_platform_data
ab8500_regulator_plat_data
;
extern
struct
ab8500_regulator_platform_data
ab8505_regulator_plat_data
;
extern
struct
regulator_init_data
tps61052_regulator
;
extern
struct
regulator_init_data
gpio_en_3v3_regulator
;
void
mop500_regulator_init
(
void
);
#endif
arch/arm/mach-ux500/board-mop500.c
View file @
c98cac89
...
...
@@ -199,10 +199,7 @@ static struct platform_device snowball_sbnet_dev = {
struct
ab8500_platform_data
ab8500_platdata
=
{
.
irq_base
=
MOP500_AB8500_IRQ_BASE
,
.
regulator_reg_init
=
ab8500_regulator_reg_init
,
.
num_regulator_reg_init
=
ARRAY_SIZE
(
ab8500_regulator_reg_init
),
.
regulator
=
ab8500_regulators
,
.
num_regulator
=
ARRAY_SIZE
(
ab8500_regulators
),
.
regulator
=
&
ab8500_regulator_plat_data
,
.
gpio
=
&
ab8500_gpio_pdata
,
.
codec
=
&
ab8500_codec_pdata
,
};
...
...
drivers/regulator/Makefile
View file @
c98cac89
...
...
@@ -12,7 +12,7 @@ obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o
obj-$(CONFIG_REGULATOR_88PM8607)
+=
88pm8607.o
obj-$(CONFIG_REGULATOR_AAT2870)
+=
aat2870-regulator.o
obj-$(CONFIG_REGULATOR_AB3100)
+=
ab3100.o
obj-$(CONFIG_REGULATOR_AB8500)
+=
ab8500.o
obj-$(CONFIG_REGULATOR_AB8500)
+=
ab8500.o
ab8500-ext.o
obj-$(CONFIG_REGULATOR_AD5398)
+=
ad5398.o
obj-$(CONFIG_REGULATOR_ANATOP)
+=
anatop-regulator.o
obj-$(CONFIG_REGULATOR_ARIZONA)
+=
arizona-micsupp.o arizona-ldo1.o
...
...
drivers/regulator/ab8500-ext.c
0 → 100644
View file @
c98cac89
This diff is collapsed.
Click to expand it.
drivers/regulator/ab8500.c
View file @
c98cac89
This diff is collapsed.
Click to expand it.
drivers/regulator/dbx500-prcmu.h
View file @
c98cac89
...
...
@@ -21,7 +21,6 @@
* @is_enabled: status of the regulator
* @epod_id: id for EPOD (power domain)
* @is_ramret: RAM retention switch for EPOD (power domain)
* @operating_point: operating point (only for vape, to be removed)
*
*/
struct
dbx500_regulator_info
{
...
...
@@ -32,7 +31,6 @@ struct dbx500_regulator_info {
u16
epod_id
;
bool
is_ramret
;
bool
exclude_from_power_state
;
unsigned
int
operating_point
;
};
void
power_state_active_enable
(
void
);
...
...
include/linux/mfd/abx500/ab8500.h
View file @
c98cac89
...
...
@@ -364,8 +364,7 @@ struct ab8500 {
const
int
*
irq_reg_offset
;
};
struct
regulator_reg_init
;
struct
regulator_init_data
;
struct
ab8500_regulator_platform_data
;
struct
ab8500_gpio_platform_data
;
struct
ab8500_codec_platform_data
;
struct
ab8500_sysctrl_platform_data
;
...
...
@@ -375,19 +374,13 @@ struct ab8500_sysctrl_platform_data;
* @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used
* @pm_power_off: Should machine pm power off hook be registered or not
* @init: board-specific initialization after detection of ab8500
* @num_regulator_reg_init: number of regulator init registers
* @regulator_reg_init: regulator init registers
* @num_regulator: number of regulators
* @regulator: machine-specific constraints for regulators
*/
struct
ab8500_platform_data
{
int
irq_base
;
bool
pm_power_off
;
void
(
*
init
)
(
struct
ab8500
*
);
int
num_regulator_reg_init
;
struct
ab8500_regulator_reg_init
*
regulator_reg_init
;
int
num_regulator
;
struct
regulator_init_data
*
regulator
;
struct
ab8500_regulator_platform_data
*
regulator
;
struct
abx500_gpio_platform_data
*
gpio
;
struct
ab8500_codec_platform_data
*
codec
;
struct
ab8500_sysctrl_platform_data
*
sysctrl
;
...
...
include/linux/regulator/ab8500.h
View file @
c98cac89
...
...
@@ -5,11 +5,14 @@
*
* Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
* Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
* Daniel Willerud <daniel.willerud@stericsson.com> for ST-Ericsson
*/
#ifndef __LINUX_MFD_AB8500_REGULATOR_H
#define __LINUX_MFD_AB8500_REGULATOR_H
#include <linux/platform_device.h>
/* AB8500 regulators */
enum
ab8500_regulator_id
{
AB8500_LDO_AUX1
,
...
...
@@ -17,7 +20,6 @@ enum ab8500_regulator_id {
AB8500_LDO_AUX3
,
AB8500_LDO_INTCORE
,
AB8500_LDO_TVOUT
,
AB8500_LDO_USB
,
AB8500_LDO_AUDIO
,
AB8500_LDO_ANAMIC1
,
AB8500_LDO_ANAMIC2
,
...
...
@@ -26,7 +28,28 @@ enum ab8500_regulator_id {
AB8500_NUM_REGULATORS
,
};
/* AB9450 regulators */
/* AB8505 regulators */
enum
ab8505_regulator_id
{
AB8505_LDO_AUX1
,
AB8505_LDO_AUX2
,
AB8505_LDO_AUX3
,
AB8505_LDO_AUX4
,
AB8505_LDO_AUX5
,
AB8505_LDO_AUX6
,
AB8505_LDO_INTCORE
,
AB8505_LDO_ADC
,
AB8505_LDO_USB
,
AB8505_LDO_AUDIO
,
AB8505_LDO_ANAMIC1
,
AB8505_LDO_ANAMIC2
,
AB8505_LDO_AUX8
,
AB8505_LDO_ANA
,
AB8505_SYSCLKREQ_2
,
AB8505_SYSCLKREQ_4
,
AB8505_NUM_REGULATORS
,
};
/* AB9540 regulators */
enum
ab9540_regulator_id
{
AB9540_LDO_AUX1
,
AB9540_LDO_AUX2
,
...
...
@@ -45,15 +68,38 @@ enum ab9540_regulator_id {
AB9540_NUM_REGULATORS
,
};
/* AB8500 and AB9540 register initialization */
/* AB8540 regulators */
enum
ab8540_regulator_id
{
AB8540_LDO_AUX1
,
AB8540_LDO_AUX2
,
AB8540_LDO_AUX3
,
AB8540_LDO_AUX4
,
AB8540_LDO_AUX5
,
AB8540_LDO_AUX6
,
AB8540_LDO_INTCORE
,
AB8540_LDO_TVOUT
,
AB8540_LDO_AUDIO
,
AB8540_LDO_ANAMIC1
,
AB8540_LDO_ANAMIC2
,
AB8540_LDO_DMIC
,
AB8540_LDO_ANA
,
AB8540_LDO_SDIO
,
AB8540_SYSCLKREQ_2
,
AB8540_SYSCLKREQ_4
,
AB8540_NUM_REGULATORS
,
};
/* AB8500, AB8505, and AB9540 register initialization */
struct
ab8500_regulator_reg_init
{
int
id
;
u8
mask
;
u8
value
;
};
#define INIT_REGULATOR_REGISTER(_id, _value) \
#define INIT_REGULATOR_REGISTER(_id, _
mask, _
value) \
{ \
.id = _id, \
.mask = _mask, \
.value = _value, \
}
...
...
@@ -86,10 +132,58 @@ enum ab8500_regulator_reg {
AB8500_REGUCTRL2SPARE
,
AB8500_REGUCTRLDISCH
,
AB8500_REGUCTRLDISCH2
,
AB8500_VSMPS1SEL1
,
AB8500_NUM_REGULATOR_REGISTERS
,
};
/* AB8505 registers */
enum
ab8505_regulator_reg
{
AB8505_REGUREQUESTCTRL1
,
AB8505_REGUREQUESTCTRL2
,
AB8505_REGUREQUESTCTRL3
,
AB8505_REGUREQUESTCTRL4
,
AB8505_REGUSYSCLKREQ1HPVALID1
,
AB8505_REGUSYSCLKREQ1HPVALID2
,
AB8505_REGUHWHPREQ1VALID1
,
AB8505_REGUHWHPREQ1VALID2
,
AB8505_REGUHWHPREQ2VALID1
,
AB8505_REGUHWHPREQ2VALID2
,
AB8505_REGUSWHPREQVALID1
,
AB8505_REGUSWHPREQVALID2
,
AB8505_REGUSYSCLKREQVALID1
,
AB8505_REGUSYSCLKREQVALID2
,
AB8505_REGUVAUX4REQVALID
,
AB8505_REGUMISC1
,
AB8505_VAUDIOSUPPLY
,
AB8505_REGUCTRL1VAMIC
,
AB8505_VSMPSAREGU
,
AB8505_VSMPSBREGU
,
AB8505_VSAFEREGU
,
/* NOTE! PRCMU register */
AB8505_VPLLVANAREGU
,
AB8505_EXTSUPPLYREGU
,
AB8505_VAUX12REGU
,
AB8505_VRF1VAUX3REGU
,
AB8505_VSMPSASEL1
,
AB8505_VSMPSASEL2
,
AB8505_VSMPSASEL3
,
AB8505_VSMPSBSEL1
,
AB8505_VSMPSBSEL2
,
AB8505_VSMPSBSEL3
,
AB8505_VSAFESEL1
,
/* NOTE! PRCMU register */
AB8505_VSAFESEL2
,
/* NOTE! PRCMU register */
AB8505_VSAFESEL3
,
/* NOTE! PRCMU register */
AB8505_VAUX1SEL
,
AB8505_VAUX2SEL
,
AB8505_VRF1VAUX3SEL
,
AB8505_VAUX4REQCTRL
,
AB8505_VAUX4REGU
,
AB8505_VAUX4SEL
,
AB8505_REGUCTRLDISCH
,
AB8505_REGUCTRLDISCH2
,
AB8505_REGUCTRLDISCH3
,
AB8505_CTRLVAUX5
,
AB8505_CTRLVAUX6
,
AB8505_NUM_REGULATOR_REGISTERS
,
};
/* AB9540 registers */
enum
ab9540_regulator_reg
{
...
...
@@ -139,4 +233,111 @@ enum ab9540_regulator_reg {
AB9540_NUM_REGULATOR_REGISTERS
,
};
/* AB8540 registers */
enum
ab8540_regulator_reg
{
AB8540_REGUREQUESTCTRL1
,
AB8540_REGUREQUESTCTRL2
,
AB8540_REGUREQUESTCTRL3
,
AB8540_REGUREQUESTCTRL4
,
AB8540_REGUSYSCLKREQ1HPVALID1
,
AB8540_REGUSYSCLKREQ1HPVALID2
,
AB8540_REGUHWHPREQ1VALID1
,
AB8540_REGUHWHPREQ1VALID2
,
AB8540_REGUHWHPREQ2VALID1
,
AB8540_REGUHWHPREQ2VALID2
,
AB8540_REGUSWHPREQVALID1
,
AB8540_REGUSWHPREQVALID2
,
AB8540_REGUSYSCLKREQVALID1
,
AB8540_REGUSYSCLKREQVALID2
,
AB8540_REGUVAUX4REQVALID
,
AB8540_REGUVAUX5REQVALID
,
AB8540_REGUVAUX6REQVALID
,
AB8540_REGUVCLKBREQVALID
,
AB8540_REGUVRF1REQVALID
,
AB8540_REGUMISC1
,
AB8540_VAUDIOSUPPLY
,
AB8540_REGUCTRL1VAMIC
,
AB8540_VHSIC
,
AB8540_VSDIO
,
AB8540_VSMPS1REGU
,
AB8540_VSMPS2REGU
,
AB8540_VSMPS3REGU
,
AB8540_VPLLVANAREGU
,
AB8540_EXTSUPPLYREGU
,
AB8540_VAUX12REGU
,
AB8540_VRF1VAUX3REGU
,
AB8540_VSMPS1SEL1
,
AB8540_VSMPS1SEL2
,
AB8540_VSMPS1SEL3
,
AB8540_VSMPS2SEL1
,
AB8540_VSMPS2SEL2
,
AB8540_VSMPS2SEL3
,
AB8540_VSMPS3SEL1
,
AB8540_VSMPS3SEL2
,
AB8540_VAUX1SEL
,
AB8540_VAUX2SEL
,
AB8540_VRF1VAUX3SEL
,
AB8540_REGUCTRL2SPARE
,
AB8540_VAUX4REQCTRL
,
AB8540_VAUX4REGU
,
AB8540_VAUX4SEL
,
AB8540_VAUX5REQCTRL
,
AB8540_VAUX5REGU
,
AB8540_VAUX5SEL
,
AB8540_VAUX6REQCTRL
,
AB8540_VAUX6REGU
,
AB8540_VAUX6SEL
,
AB8540_VCLKBREQCTRL
,
AB8540_VCLKBREGU
,
AB8540_VCLKBSEL
,
AB8540_VRF1REQCTRL
,
AB8540_REGUCTRLDISCH
,
AB8540_REGUCTRLDISCH2
,
AB8540_REGUCTRLDISCH3
,
AB8540_REGUCTRLDISCH4
,
AB8540_VSIMSYSCLKCTRL
,
AB8540_VANAVPLLSEL
,
AB8540_NUM_REGULATOR_REGISTERS
,
};
/* AB8500 external regulators */
struct
ab8500_ext_regulator_cfg
{
bool
hwreq
;
/* requires hw mode or high power mode */
};
enum
ab8500_ext_regulator_id
{
AB8500_EXT_SUPPLY1
,
AB8500_EXT_SUPPLY2
,
AB8500_EXT_SUPPLY3
,
AB8500_NUM_EXT_REGULATORS
,
};
/* AB8500 regulator platform data */
struct
ab8500_regulator_platform_data
{
int
num_reg_init
;
struct
ab8500_regulator_reg_init
*
reg_init
;
int
num_regulator
;
struct
regulator_init_data
*
regulator
;
int
num_ext_regulator
;
struct
regulator_init_data
*
ext_regulator
;
};
#ifdef CONFIG_REGULATOR_AB8500_DEBUG
int
ab8500_regulator_debug_init
(
struct
platform_device
*
pdev
);
int
ab8500_regulator_debug_exit
(
struct
platform_device
*
pdev
);
#else
static
inline
int
ab8500_regulator_debug_init
(
struct
platform_device
*
pdev
)
{
return
0
;
}
static
inline
int
ab8500_regulator_debug_exit
(
struct
platform_device
*
pdev
)
{
return
0
;
}
#endif
/* AB8500 external regulator functions. */
int
ab8500_ext_regulator_init
(
struct
platform_device
*
pdev
);
void
ab8500_ext_regulator_exit
(
struct
platform_device
*
pdev
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment