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
3242a861
Commit
3242a861
authored
Oct 24, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/da9210' into regulator-next
parents
513b485a
937433c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
3 deletions
+27
-3
Documentation/devicetree/bindings/regulator/da9210.txt
Documentation/devicetree/bindings/regulator/da9210.txt
+21
-0
drivers/regulator/da9210-regulator.c
drivers/regulator/da9210-regulator.c
+6
-3
No files found.
Documentation/devicetree/bindings/regulator/da9210.txt
0 → 100644
View file @
3242a861
* Dialog Semiconductor DA9210 Voltage Regulator
Required properties:
- compatible: must be "diasemi,da9210"
- reg: the i2c slave address of the regulator. It should be 0x68.
Any standard regulator properties can be used to configure the single da9210
DCDC.
Example:
da9210@68 {
compatible = "diasemi,da9210";
reg = <0x68>;
regulator-min-microvolt = <900000>;
regulator-max-microvolt = <1000000>;
regulator-boot-on;
regulator-always-on;
};
drivers/regulator/da9210-regulator.c
View file @
3242a861
...
...
@@ -25,6 +25,7 @@
#include <linux/slab.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regmap.h>
#include "da9210-regulator.h"
...
...
@@ -126,7 +127,8 @@ static int da9210_i2c_probe(struct i2c_client *i2c,
const
struct
i2c_device_id
*
id
)
{
struct
da9210
*
chip
;
struct
da9210_pdata
*
pdata
=
i2c
->
dev
.
platform_data
;
struct
device
*
dev
=
&
i2c
->
dev
;
struct
da9210_pdata
*
pdata
=
dev_get_platdata
(
dev
);
struct
regulator_dev
*
rdev
=
NULL
;
struct
regulator_config
config
=
{
};
int
error
;
...
...
@@ -147,10 +149,11 @@ static int da9210_i2c_probe(struct i2c_client *i2c,
}
config
.
dev
=
&
i2c
->
dev
;
if
(
pdata
)
config
.
init_data
=
&
pdata
->
da9210_constraints
;
config
.
init_data
=
pdata
?
&
pdata
->
da9210_constraints
:
of_get_regulator_init_data
(
dev
,
dev
->
of_node
)
;
config
.
driver_data
=
chip
;
config
.
regmap
=
chip
->
regmap
;
config
.
of_node
=
dev
->
of_node
;
rdev
=
regulator_register
(
&
da9210_reg
,
&
config
);
if
(
IS_ERR
(
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