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
0e340ce1
Commit
0e340ce1
authored
Apr 28, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/core' into v3.9-rc8
parents
97844ede
020501f1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
24 deletions
+34
-24
drivers/regulator/core.c
drivers/regulator/core.c
+20
-3
drivers/regulator/max1586.c
drivers/regulator/max1586.c
+1
-2
drivers/regulator/max8649.c
drivers/regulator/max8649.c
+2
-4
drivers/regulator/max8660.c
drivers/regulator/max8660.c
+1
-2
drivers/regulator/s5m8767.c
drivers/regulator/s5m8767.c
+2
-4
drivers/regulator/tps6524x-regulator.c
drivers/regulator/tps6524x-regulator.c
+1
-2
include/linux/regulator/consumer.h
include/linux/regulator/consumer.h
+7
-7
No files found.
drivers/regulator/core.c
View file @
0e340ce1
...
...
@@ -116,7 +116,7 @@ static const char *rdev_get_name(struct regulator_dev *rdev)
* @supply: regulator supply name
*
* Extract the regulator device node corresponding to the supply name.
* ret
ru
ns the device node corresponding to the regulator if found, else
* ret
ur
ns the device node corresponding to the regulator if found, else
* returns NULL.
*/
static
struct
device_node
*
of_get_regulator
(
struct
device
*
dev
,
const
char
*
supply
)
...
...
@@ -1229,7 +1229,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
struct
regulator_dev
*
rdev
;
struct
regulator
*
regulator
=
ERR_PTR
(
-
EPROBE_DEFER
);
const
char
*
devname
=
NULL
;
int
ret
;
int
ret
=
0
;
if
(
id
==
NULL
)
{
pr_err
(
"get() with no identifier
\n
"
);
...
...
@@ -1245,6 +1245,15 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
if
(
rdev
)
goto
found
;
/*
* If we have return value from dev_lookup fail, we do not expect to
* succeed, so, quit with appropriate error value
*/
if
(
ret
)
{
regulator
=
ERR_PTR
(
ret
);
goto
out
;
}
if
(
board_wants_dummy_regulator
)
{
rdev
=
dummy_regulator_rdev
;
goto
found
;
...
...
@@ -3512,7 +3521,14 @@ regulator_register(const struct regulator_desc *regulator_desc,
r
=
regulator_dev_lookup
(
dev
,
supply
,
&
ret
);
if
(
!
r
)
{
if
(
ret
==
-
ENODEV
)
{
/*
* No supply was specified for this regulator and
* there will never be one.
*/
ret
=
0
;
goto
add_dev
;
}
else
if
(
!
r
)
{
dev_err
(
dev
,
"Failed to find supply %s
\n
"
,
supply
);
ret
=
-
EPROBE_DEFER
;
goto
scrub
;
...
...
@@ -3530,6 +3546,7 @@ regulator_register(const struct regulator_desc *regulator_desc,
}
}
add_dev:
/* add consumers devices */
if
(
init_data
)
{
for
(
i
=
0
;
i
<
init_data
->
num_consumer_supplies
;
i
++
)
{
...
...
drivers/regulator/max1586.c
View file @
0e340ce1
...
...
@@ -232,8 +232,7 @@ static int max1586_pmic_remove(struct i2c_client *client)
int
i
;
for
(
i
=
0
;
i
<=
MAX1586_V6
;
i
++
)
if
(
max1586
->
rdev
[
i
])
regulator_unregister
(
max1586
->
rdev
[
i
]);
regulator_unregister
(
max1586
->
rdev
[
i
]);
return
0
;
}
...
...
drivers/regulator/max8649.c
View file @
0e340ce1
...
...
@@ -275,10 +275,8 @@ static int max8649_regulator_remove(struct i2c_client *client)
{
struct
max8649_regulator_info
*
info
=
i2c_get_clientdata
(
client
);
if
(
info
)
{
if
(
info
->
regulator
)
regulator_unregister
(
info
->
regulator
);
}
if
(
info
)
regulator_unregister
(
info
->
regulator
);
return
0
;
}
...
...
drivers/regulator/max8660.c
View file @
0e340ce1
...
...
@@ -426,8 +426,7 @@ static int max8660_remove(struct i2c_client *client)
int
i
;
for
(
i
=
0
;
i
<
MAX8660_V_END
;
i
++
)
if
(
max8660
->
rdev
[
i
])
regulator_unregister
(
max8660
->
rdev
[
i
]);
regulator_unregister
(
max8660
->
rdev
[
i
]);
return
0
;
}
...
...
drivers/regulator/s5m8767.c
View file @
0e340ce1
...
...
@@ -923,8 +923,7 @@ static int s5m8767_pmic_probe(struct platform_device *pdev)
return
0
;
err:
for
(
i
=
0
;
i
<
s5m8767
->
num_regulators
;
i
++
)
if
(
rdev
[
i
])
regulator_unregister
(
rdev
[
i
]);
regulator_unregister
(
rdev
[
i
]);
return
ret
;
}
...
...
@@ -936,8 +935,7 @@ static int s5m8767_pmic_remove(struct platform_device *pdev)
int
i
;
for
(
i
=
0
;
i
<
s5m8767
->
num_regulators
;
i
++
)
if
(
rdev
[
i
])
regulator_unregister
(
rdev
[
i
]);
regulator_unregister
(
rdev
[
i
]);
return
0
;
}
...
...
drivers/regulator/tps6524x-regulator.c
View file @
0e340ce1
...
...
@@ -585,8 +585,7 @@ static int pmic_remove(struct spi_device *spi)
if
(
!
hw
)
return
0
;
for
(
i
=
0
;
i
<
N_REGULATORS
;
i
++
)
{
if
(
hw
->
rdev
[
i
])
regulator_unregister
(
hw
->
rdev
[
i
]);
regulator_unregister
(
hw
->
rdev
[
i
]);
hw
->
rdev
[
i
]
=
NULL
;
}
spi_set_drvdata
(
spi
,
NULL
);
...
...
include/linux/regulator/consumer.h
View file @
0e340ce1
...
...
@@ -141,18 +141,18 @@ void regulator_put(struct regulator *regulator);
void
devm_regulator_put
(
struct
regulator
*
regulator
);
/* regulator output control and status */
int
regulator_enable
(
struct
regulator
*
regulator
);
int
__must_check
regulator_enable
(
struct
regulator
*
regulator
);
int
regulator_disable
(
struct
regulator
*
regulator
);
int
regulator_force_disable
(
struct
regulator
*
regulator
);
int
regulator_is_enabled
(
struct
regulator
*
regulator
);
int
regulator_disable_deferred
(
struct
regulator
*
regulator
,
int
ms
);
int
regulator_bulk_get
(
struct
device
*
dev
,
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
devm_regulator_bulk_get
(
struct
device
*
dev
,
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
regulator_bulk_enable
(
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
__must_check
regulator_bulk_get
(
struct
device
*
dev
,
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
__must_check
devm_regulator_bulk_get
(
struct
device
*
dev
,
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
__must_check
regulator_bulk_enable
(
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
regulator_bulk_disable
(
int
num_consumers
,
struct
regulator_bulk_data
*
consumers
);
int
regulator_bulk_force_disable
(
int
num_consumers
,
...
...
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