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
a4dba88e
Commit
a4dba88e
authored
Feb 19, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/gpio' into regulator-next
parents
eb230d4a
896b65f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
drivers/regulator/core.c
drivers/regulator/core.c
+1
-1
drivers/regulator/gpio-regulator.c
drivers/regulator/gpio-regulator.c
+2
-5
No files found.
drivers/regulator/core.c
View file @
a4dba88e
...
...
@@ -3233,7 +3233,7 @@ static int add_regulator_attributes(struct regulator_dev *rdev)
if
(
status
<
0
)
return
status
;
}
if
(
ops
->
is_enabled
)
{
if
(
rdev
->
ena_gpio
||
ops
->
is_enabled
)
{
status
=
device_create_file
(
dev
,
&
dev_attr_state
);
if
(
status
<
0
)
return
status
;
...
...
drivers/regulator/gpio-regulator.c
View file @
a4dba88e
...
...
@@ -132,7 +132,7 @@ static struct regulator_ops gpio_regulator_voltage_ops = {
.
list_voltage
=
gpio_regulator_list_voltage
,
};
struct
gpio_regulator_config
*
st
atic
st
ruct
gpio_regulator_config
*
of_get_gpio_regulator_config
(
struct
device
*
dev
,
struct
device_node
*
np
)
{
struct
gpio_regulator_config
*
config
;
...
...
@@ -163,10 +163,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
config
->
enable_gpio
=
of_get_named_gpio
(
np
,
"enable-gpio"
,
0
);
/* Fetch GPIOs. */
for
(
i
=
0
;
;
i
++
)
if
(
of_get_named_gpio
(
np
,
"gpios"
,
i
)
<
0
)
break
;
config
->
nr_gpios
=
i
;
config
->
nr_gpios
=
of_gpio_count
(
np
);
config
->
gpios
=
devm_kzalloc
(
dev
,
sizeof
(
struct
gpio
)
*
config
->
nr_gpios
,
...
...
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