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
nexedi
linux
Commits
97844ede
Commit
97844ede
authored
Apr 28, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/ascend' into v3.9-rc8
parents
83b0dd9e
b92f567d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
57 additions
and
10 deletions
+57
-10
drivers/regulator/core.c
drivers/regulator/core.c
+31
-0
drivers/regulator/lp3971.c
drivers/regulator/lp3971.c
+2
-0
drivers/regulator/lp3972.c
drivers/regulator/lp3972.c
+2
-0
drivers/regulator/lp872x.c
drivers/regulator/lp872x.c
+3
-0
drivers/regulator/lp8788-buck.c
drivers/regulator/lp8788-buck.c
+2
-0
drivers/regulator/mc13892-regulator.c
drivers/regulator/mc13892-regulator.c
+1
-0
drivers/regulator/tps65023-regulator.c
drivers/regulator/tps65023-regulator.c
+7
-10
drivers/regulator/tps6507x-regulator.c
drivers/regulator/tps6507x-regulator.c
+1
-0
drivers/regulator/tps6524x-regulator.c
drivers/regulator/tps6524x-regulator.c
+1
-0
drivers/regulator/tps6586x-regulator.c
drivers/regulator/tps6586x-regulator.c
+1
-0
drivers/regulator/tps65910-regulator.c
drivers/regulator/tps65910-regulator.c
+4
-0
include/linux/regulator/driver.h
include/linux/regulator/driver.h
+2
-0
No files found.
drivers/regulator/core.c
View file @
97844ede
...
...
@@ -2137,6 +2137,37 @@ int regulator_map_voltage_iterate(struct regulator_dev *rdev,
}
EXPORT_SYMBOL_GPL
(
regulator_map_voltage_iterate
);
/**
* regulator_map_voltage_ascend - map_voltage() for ascendant voltage list
*
* @rdev: Regulator to operate on
* @min_uV: Lower bound for voltage
* @max_uV: Upper bound for voltage
*
* Drivers that have ascendant voltage list can use this as their
* map_voltage() operation.
*/
int
regulator_map_voltage_ascend
(
struct
regulator_dev
*
rdev
,
int
min_uV
,
int
max_uV
)
{
int
i
,
ret
;
for
(
i
=
0
;
i
<
rdev
->
desc
->
n_voltages
;
i
++
)
{
ret
=
rdev
->
desc
->
ops
->
list_voltage
(
rdev
,
i
);
if
(
ret
<
0
)
continue
;
if
(
ret
>
max_uV
)
break
;
if
(
ret
>=
min_uV
&&
ret
<=
max_uV
)
return
i
;
}
return
-
EINVAL
;
}
EXPORT_SYMBOL_GPL
(
regulator_map_voltage_ascend
);
/**
* regulator_map_voltage_linear - map_voltage() for simple linear mappings
*
...
...
drivers/regulator/lp3971.c
View file @
97844ede
...
...
@@ -163,6 +163,7 @@ static int lp3971_ldo_set_voltage_sel(struct regulator_dev *dev,
static
struct
regulator_ops
lp3971_ldo_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
is_enabled
=
lp3971_ldo_is_enabled
,
.
enable
=
lp3971_ldo_enable
,
.
disable
=
lp3971_ldo_disable
,
...
...
@@ -236,6 +237,7 @@ static int lp3971_dcdc_set_voltage_sel(struct regulator_dev *dev,
static
struct
regulator_ops
lp3971_dcdc_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
is_enabled
=
lp3971_dcdc_is_enabled
,
.
enable
=
lp3971_dcdc_enable
,
.
disable
=
lp3971_dcdc_disable
,
...
...
drivers/regulator/lp3972.c
View file @
97844ede
...
...
@@ -309,6 +309,7 @@ static int lp3972_ldo_set_voltage_sel(struct regulator_dev *dev,
static
struct
regulator_ops
lp3972_ldo_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
is_enabled
=
lp3972_ldo_is_enabled
,
.
enable
=
lp3972_ldo_enable
,
.
disable
=
lp3972_ldo_disable
,
...
...
@@ -389,6 +390,7 @@ static int lp3972_dcdc_set_voltage_sel(struct regulator_dev *dev,
static
struct
regulator_ops
lp3972_dcdc_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
is_enabled
=
lp3972_dcdc_is_enabled
,
.
enable
=
lp3972_dcdc_enable
,
.
disable
=
lp3972_dcdc_disable
,
...
...
drivers/regulator/lp872x.c
View file @
97844ede
...
...
@@ -478,6 +478,7 @@ static unsigned int lp872x_buck_get_mode(struct regulator_dev *rdev)
static
struct
regulator_ops
lp872x_ldo_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_voltage_sel
=
regulator_set_voltage_sel_regmap
,
.
get_voltage_sel
=
regulator_get_voltage_sel_regmap
,
.
enable
=
regulator_enable_regmap
,
...
...
@@ -488,6 +489,7 @@ static struct regulator_ops lp872x_ldo_ops = {
static
struct
regulator_ops
lp8720_buck_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_voltage_sel
=
lp872x_buck_set_voltage_sel
,
.
get_voltage_sel
=
lp872x_buck_get_voltage_sel
,
.
enable
=
regulator_enable_regmap
,
...
...
@@ -500,6 +502,7 @@ static struct regulator_ops lp8720_buck_ops = {
static
struct
regulator_ops
lp8725_buck_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_voltage_sel
=
lp872x_buck_set_voltage_sel
,
.
get_voltage_sel
=
lp872x_buck_get_voltage_sel
,
.
enable
=
regulator_enable_regmap
,
...
...
drivers/regulator/lp8788-buck.c
View file @
97844ede
...
...
@@ -346,6 +346,7 @@ static unsigned int lp8788_buck_get_mode(struct regulator_dev *rdev)
static
struct
regulator_ops
lp8788_buck12_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_voltage_sel
=
lp8788_buck12_set_voltage_sel
,
.
get_voltage_sel
=
lp8788_buck12_get_voltage_sel
,
.
enable
=
regulator_enable_regmap
,
...
...
@@ -358,6 +359,7 @@ static struct regulator_ops lp8788_buck12_ops = {
static
struct
regulator_ops
lp8788_buck34_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_voltage_sel
=
regulator_set_voltage_sel_regmap
,
.
get_voltage_sel
=
regulator_get_voltage_sel_regmap
,
.
enable
=
regulator_enable_regmap
,
...
...
drivers/regulator/mc13892-regulator.c
View file @
97844ede
...
...
@@ -485,6 +485,7 @@ static int mc13892_sw_regulator_set_voltage_sel(struct regulator_dev *rdev,
static
struct
regulator_ops
mc13892_sw_regulator_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_voltage_sel
=
mc13892_sw_regulator_set_voltage_sel
,
.
get_voltage_sel
=
mc13892_sw_regulator_get_voltage_sel
,
};
...
...
drivers/regulator/tps65023-regulator.c
View file @
97844ede
...
...
@@ -107,12 +107,7 @@ static const unsigned int DCDC_FIXED_1800000_VSEL_table[] = {
};
/* Supported voltage values for LDO regulators for tps65020 */
static
const
unsigned
int
TPS65020_LDO1_VSEL_table
[]
=
{
1000000
,
1050000
,
1100000
,
1300000
,
1800000
,
2500000
,
3000000
,
3300000
,
};
static
const
unsigned
int
TPS65020_LDO2_VSEL_table
[]
=
{
static
const
unsigned
int
TPS65020_LDO_VSEL_table
[]
=
{
1000000
,
1050000
,
1100000
,
1300000
,
1800000
,
2500000
,
3000000
,
3300000
,
};
...
...
@@ -202,6 +197,7 @@ static struct regulator_ops tps65023_dcdc_ops = {
.
get_voltage_sel
=
tps65023_dcdc_get_voltage_sel
,
.
set_voltage_sel
=
tps65023_dcdc_set_voltage_sel
,
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
/* Operations permitted on LDOx */
...
...
@@ -212,6 +208,7 @@ static struct regulator_ops tps65023_ldo_ops = {
.
get_voltage_sel
=
regulator_get_voltage_sel_regmap
,
.
set_voltage_sel
=
regulator_set_voltage_sel_regmap
,
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
static
struct
regmap_config
tps65023_regmap_config
=
{
...
...
@@ -347,13 +344,13 @@ static const struct tps_info tps65020_regs[] = {
},
{
.
name
=
"LDO1"
,
.
table_len
=
ARRAY_SIZE
(
TPS65020_LDO
1
_VSEL_table
),
.
table
=
TPS65020_LDO
1
_VSEL_table
,
.
table_len
=
ARRAY_SIZE
(
TPS65020_LDO_VSEL_table
),
.
table
=
TPS65020_LDO_VSEL_table
,
},
{
.
name
=
"LDO2"
,
.
table_len
=
ARRAY_SIZE
(
TPS65020_LDO
2
_VSEL_table
),
.
table
=
TPS65020_LDO
2
_VSEL_table
,
.
table_len
=
ARRAY_SIZE
(
TPS65020_LDO_VSEL_table
),
.
table
=
TPS65020_LDO_VSEL_table
,
},
};
...
...
drivers/regulator/tps6507x-regulator.c
View file @
97844ede
...
...
@@ -356,6 +356,7 @@ static struct regulator_ops tps6507x_pmic_ops = {
.
get_voltage_sel
=
tps6507x_pmic_get_voltage_sel
,
.
set_voltage_sel
=
tps6507x_pmic_set_voltage_sel
,
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
#ifdef CONFIG_OF
...
...
drivers/regulator/tps6524x-regulator.c
View file @
97844ede
...
...
@@ -572,6 +572,7 @@ static struct regulator_ops regulator_ops = {
.
get_voltage_sel
=
get_voltage_sel
,
.
set_voltage_sel
=
set_voltage_sel
,
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
set_current_limit
=
set_current_limit
,
.
get_current_limit
=
get_current_limit
,
};
...
...
drivers/regulator/tps6586x-regulator.c
View file @
97844ede
...
...
@@ -70,6 +70,7 @@ static inline struct device *to_tps6586x_dev(struct regulator_dev *rdev)
static
struct
regulator_ops
tps6586x_regulator_ops
=
{
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
.
get_voltage_sel
=
regulator_get_voltage_sel_regmap
,
.
set_voltage_sel
=
regulator_set_voltage_sel_regmap
,
...
...
drivers/regulator/tps65910-regulator.c
View file @
97844ede
...
...
@@ -748,6 +748,7 @@ static struct regulator_ops tps65910_ops_dcdc = {
.
set_voltage_sel
=
tps65910_set_voltage_dcdc_sel
,
.
set_voltage_time_sel
=
regulator_set_voltage_time_sel
,
.
list_voltage
=
tps65910_list_voltage_dcdc
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
static
struct
regulator_ops
tps65910_ops_vdd3
=
{
...
...
@@ -758,6 +759,7 @@ static struct regulator_ops tps65910_ops_vdd3 = {
.
get_mode
=
tps65910_get_mode
,
.
get_voltage
=
tps65910_get_voltage_vdd3
,
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
static
struct
regulator_ops
tps65910_ops
=
{
...
...
@@ -769,6 +771,7 @@ static struct regulator_ops tps65910_ops = {
.
get_voltage_sel
=
tps65910_get_voltage_sel
,
.
set_voltage_sel
=
tps65910_set_voltage_sel
,
.
list_voltage
=
regulator_list_voltage_table
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
static
struct
regulator_ops
tps65911_ops
=
{
...
...
@@ -780,6 +783,7 @@ static struct regulator_ops tps65911_ops = {
.
get_voltage_sel
=
tps65911_get_voltage_sel
,
.
set_voltage_sel
=
tps65911_set_voltage_sel
,
.
list_voltage
=
tps65911_list_voltage
,
.
map_voltage
=
regulator_map_voltage_ascend
,
};
static
int
tps65910_set_ext_sleep_config
(
struct
tps65910_reg
*
pmic
,
...
...
include/linux/regulator/driver.h
View file @
97844ede
...
...
@@ -329,6 +329,8 @@ int regulator_map_voltage_linear(struct regulator_dev *rdev,
int
min_uV
,
int
max_uV
);
int
regulator_map_voltage_iterate
(
struct
regulator_dev
*
rdev
,
int
min_uV
,
int
max_uV
);
int
regulator_map_voltage_ascend
(
struct
regulator_dev
*
rdev
,
int
min_uV
,
int
max_uV
);
int
regulator_get_voltage_sel_regmap
(
struct
regulator_dev
*
rdev
);
int
regulator_set_voltage_sel_regmap
(
struct
regulator_dev
*
rdev
,
unsigned
sel
);
int
regulator_is_enabled_regmap
(
struct
regulator_dev
*
rdev
);
...
...
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