Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
71e7cb73
Commit
71e7cb73
authored
Mar 25, 2021
by
André Przywara
Committed by
TrustedFirmware Code Review
Mar 25, 2021
Browse files
Merge "plat/allwinner: do not setup 'disabled' regulators" into integration
parents
9719e19a
9655a1f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
drivers/allwinner/axp/common.c
View file @
71e7cb73
...
...
@@ -96,12 +96,27 @@ static int setup_regulator(const void *fdt, int node,
return
0
;
}
static
bool
is_node_disabled
(
const
void
*
fdt
,
int
node
)
{
const
char
*
cell
;
cell
=
fdt_getprop
(
fdt
,
node
,
"status"
,
NULL
);
if
(
cell
==
NULL
)
{
return
false
;
}
return
strcmp
(
cell
,
"okay"
)
!=
0
;
}
static
bool
should_enable_regulator
(
const
void
*
fdt
,
int
node
)
{
if
(
fdt_getprop
(
fdt
,
node
,
"phandle"
,
NULL
)
!=
NULL
)
if
(
is_node_disabled
(
fdt
,
node
))
{
return
false
;
}
if
(
fdt_getprop
(
fdt
,
node
,
"phandle"
,
NULL
)
!=
NULL
)
{
return
true
;
if
(
fdt_getprop
(
fdt
,
node
,
"regulator-always-on"
,
NULL
)
!=
NULL
)
}
if
(
fdt_getprop
(
fdt
,
node
,
"regulator-always-on"
,
NULL
)
!=
NULL
)
{
return
true
;
}
return
false
;
}
...
...
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