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
6234427e
Commit
6234427e
authored
Dec 10, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/change' into regulator-next
parents
b0e5997e
d1e7de30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
drivers/regulator/core.c
drivers/regulator/core.c
+22
-0
include/linux/regulator/consumer.h
include/linux/regulator/consumer.h
+1
-0
No files found.
drivers/regulator/core.c
View file @
6234427e
...
@@ -1866,6 +1866,28 @@ int regulator_is_enabled(struct regulator *regulator)
...
@@ -1866,6 +1866,28 @@ int regulator_is_enabled(struct regulator *regulator)
}
}
EXPORT_SYMBOL_GPL
(
regulator_is_enabled
);
EXPORT_SYMBOL_GPL
(
regulator_is_enabled
);
/**
* regulator_can_change_voltage - check if regulator can change voltage
* @regulator: regulator source
*
* Returns positive if the regulator driver backing the source/client
* can change its voltage, false otherwise. Usefull for detecting fixed
* or dummy regulators and disabling voltage change logic in the client
* driver.
*/
int
regulator_can_change_voltage
(
struct
regulator
*
regulator
)
{
struct
regulator_dev
*
rdev
=
regulator
->
rdev
;
if
(
rdev
->
constraints
&&
rdev
->
constraints
->
valid_ops_mask
&
REGULATOR_CHANGE_VOLTAGE
&&
rdev
->
desc
->
n_voltages
>
1
)
return
1
;
return
0
;
}
EXPORT_SYMBOL_GPL
(
regulator_can_change_voltage
);
/**
/**
* regulator_count_voltages - count regulator_list_voltage() selectors
* regulator_count_voltages - count regulator_list_voltage() selectors
* @regulator: regulator source
* @regulator: regulator source
...
...
include/linux/regulator/consumer.h
View file @
6234427e
...
@@ -160,6 +160,7 @@ int regulator_bulk_force_disable(int num_consumers,
...
@@ -160,6 +160,7 @@ int regulator_bulk_force_disable(int num_consumers,
void
regulator_bulk_free
(
int
num_consumers
,
void
regulator_bulk_free
(
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
struct
regulator_bulk_data
*
consumers
);
int
regulator_can_change_voltage
(
struct
regulator
*
regulator
);
int
regulator_count_voltages
(
struct
regulator
*
regulator
);
int
regulator_count_voltages
(
struct
regulator
*
regulator
);
int
regulator_list_voltage
(
struct
regulator
*
regulator
,
unsigned
selector
);
int
regulator_list_voltage
(
struct
regulator
*
regulator
,
unsigned
selector
);
int
regulator_is_supported_voltage
(
struct
regulator
*
regulator
,
int
regulator_is_supported_voltage
(
struct
regulator
*
regulator
,
...
...
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