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
4e62cce2
Commit
4e62cce2
authored
Dec 10, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/da9052' into regulator-next
parents
6234427e
1e369bcd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
drivers/regulator/da9052-regulator.c
drivers/regulator/da9052-regulator.c
+5
-5
No files found.
drivers/regulator/da9052-regulator.c
View file @
4e62cce2
...
...
@@ -129,17 +129,17 @@ static int da9052_dcdc_set_current_limit(struct regulator_dev *rdev, int min_uA,
else
if
(
offset
==
0
)
row
=
1
;
if
(
min_uA
>
da9052_current_limits
[
row
][
DA9052_MAX_UA
]
||
max_uA
<
da9052_current_limits
[
row
][
DA9052_MIN_UA
])
return
-
EINVAL
;
for
(
i
=
DA9052_CURRENT_RANGE
-
1
;
i
>=
0
;
i
--
)
{
if
(
da9052_current_limits
[
row
][
i
]
<=
max_uA
)
{
if
((
min_uA
<=
da9052_current_limits
[
row
][
i
])
&&
(
da9052_current_limits
[
row
][
i
]
<=
max_uA
))
{
reg_val
=
i
;
break
;
}
}
if
(
i
<
0
)
return
-
EINVAL
;
/* Determine the even or odd position of the buck current limit
* register field
*/
...
...
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