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
29dbdcf3
Commit
29dbdcf3
authored
Mar 26, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/core' into regulator-next
parents
b098d672
8669544a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
4 deletions
+22
-4
drivers/regulator/core.c
drivers/regulator/core.c
+14
-0
drivers/regulator/dummy.c
drivers/regulator/dummy.c
+5
-1
drivers/regulator/pfuze100-regulator.c
drivers/regulator/pfuze100-regulator.c
+1
-1
drivers/regulator/s2mps11.c
drivers/regulator/s2mps11.c
+2
-2
No files found.
drivers/regulator/core.c
View file @
29dbdcf3
...
...
@@ -2399,6 +2399,7 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV)
struct
regulator_dev
*
rdev
=
regulator
->
rdev
;
int
ret
=
0
;
int
old_min_uV
,
old_max_uV
;
int
current_uV
;
mutex_lock
(
&
rdev
->
mutex
);
...
...
@@ -2409,6 +2410,19 @@ int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV)
if
(
regulator
->
min_uV
==
min_uV
&&
regulator
->
max_uV
==
max_uV
)
goto
out
;
/* If we're trying to set a range that overlaps the current voltage,
* return succesfully even though the regulator does not support
* changing the voltage.
*/
if
(
!
(
rdev
->
constraints
->
valid_ops_mask
&
REGULATOR_CHANGE_VOLTAGE
))
{
current_uV
=
_regulator_get_voltage
(
rdev
);
if
(
min_uV
<=
current_uV
&&
current_uV
<=
max_uV
)
{
regulator
->
min_uV
=
min_uV
;
regulator
->
max_uV
=
max_uV
;
goto
out
;
}
}
/* sanity check */
if
(
!
rdev
->
desc
->
ops
->
set_voltage
&&
!
rdev
->
desc
->
ops
->
set_voltage_sel
)
{
...
...
drivers/regulator/dummy.c
View file @
29dbdcf3
...
...
@@ -25,7 +25,11 @@
struct
regulator_dev
*
dummy_regulator_rdev
;
static
struct
regulator_init_data
dummy_initdata
;
static
struct
regulator_init_data
dummy_initdata
=
{
.
constraints
=
{
.
always_on
=
1
,
},
};
static
struct
regulator_ops
dummy_ops
;
...
...
drivers/regulator/pfuze100-regulator.c
View file @
29dbdcf3
...
...
@@ -92,7 +92,7 @@ MODULE_DEVICE_TABLE(of, pfuze_dt_ids);
static
int
pfuze100_set_ramp_delay
(
struct
regulator_dev
*
rdev
,
int
ramp_delay
)
{
struct
pfuze_chip
*
pfuze100
=
rdev_get_drvdata
(
rdev
);
int
id
=
rdev
->
desc
->
id
;
int
id
=
rdev
_get_id
(
rdev
)
;
unsigned
int
ramp_bits
;
int
ret
;
...
...
drivers/regulator/s2mps11.c
View file @
29dbdcf3
...
...
@@ -65,7 +65,7 @@ static int s2mps11_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
unsigned
int
ramp_delay
=
0
;
int
old_volt
,
new_volt
;
switch
(
rdev
->
desc
->
id
)
{
switch
(
rdev
_get_id
(
rdev
)
)
{
case
S2MPS11_BUCK2
:
ramp_delay
=
s2mps11
->
ramp_delay2
;
break
;
...
...
@@ -105,7 +105,7 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
unsigned
int
ramp_enable
=
1
,
enable_shift
=
0
;
int
ret
;
switch
(
rdev
->
desc
->
id
)
{
switch
(
rdev
_get_id
(
rdev
)
)
{
case
S2MPS11_BUCK1
:
if
(
ramp_delay
>
s2mps11
->
ramp_delay16
)
s2mps11
->
ramp_delay16
=
ramp_delay
;
...
...
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