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
1fe23017
Commit
1fe23017
authored
Feb 19, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/max77686' into regulator-next
parents
c7b09482
40e72149
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
drivers/regulator/max77686.c
drivers/regulator/max77686.c
+8
-6
No files found.
drivers/regulator/max77686.c
View file @
1fe23017
...
...
@@ -75,13 +75,14 @@ static int max77686_buck_set_suspend_disable(struct regulator_dev *rdev)
{
unsigned
int
val
;
struct
max77686_data
*
max77686
=
rdev_get_drvdata
(
rdev
);
int
id
=
rdev_get_id
(
rdev
);
if
(
rdev
->
desc
->
id
==
MAX77686_BUCK1
)
if
(
id
==
MAX77686_BUCK1
)
val
=
0x1
;
else
val
=
0x1
<<
MAX77686_OPMODE_BUCK234_SHIFT
;
max77686
->
opmode
[
rdev
->
desc
->
id
]
=
val
;
max77686
->
opmode
[
id
]
=
val
;
return
regmap_update_bits
(
rdev
->
regmap
,
rdev
->
desc
->
enable_reg
,
rdev
->
desc
->
enable_mask
,
val
);
...
...
@@ -93,9 +94,10 @@ static int max77686_set_suspend_mode(struct regulator_dev *rdev,
{
struct
max77686_data
*
max77686
=
rdev_get_drvdata
(
rdev
);
unsigned
int
val
;
int
id
=
rdev_get_id
(
rdev
);
/* BUCK[5-9] doesn't support this feature */
if
(
rdev
->
desc
->
id
>=
MAX77686_BUCK5
)
if
(
id
>=
MAX77686_BUCK5
)
return
0
;
switch
(
mode
)
{
...
...
@@ -111,7 +113,7 @@ static int max77686_set_suspend_mode(struct regulator_dev *rdev,
return
-
EINVAL
;
}
max77686
->
opmode
[
rdev
->
desc
->
id
]
=
val
;
max77686
->
opmode
[
id
]
=
val
;
return
regmap_update_bits
(
rdev
->
regmap
,
rdev
->
desc
->
enable_reg
,
rdev
->
desc
->
enable_mask
,
val
);
...
...
@@ -140,7 +142,7 @@ static int max77686_ldo_set_suspend_mode(struct regulator_dev *rdev,
return
-
EINVAL
;
}
max77686
->
opmode
[
rdev
->
desc
->
id
]
=
val
;
max77686
->
opmode
[
rdev
_get_id
(
rdev
)
]
=
val
;
return
regmap_update_bits
(
rdev
->
regmap
,
rdev
->
desc
->
enable_reg
,
rdev
->
desc
->
enable_mask
,
val
);
...
...
@@ -152,7 +154,7 @@ static int max77686_enable(struct regulator_dev *rdev)
return
regmap_update_bits
(
rdev
->
regmap
,
rdev
->
desc
->
enable_reg
,
rdev
->
desc
->
enable_mask
,
max77686
->
opmode
[
rdev
->
desc
->
id
]);
max77686
->
opmode
[
rdev
_get_id
(
rdev
)
]);
}
static
int
max77686_set_ramp_delay
(
struct
regulator_dev
*
rdev
,
int
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