tegra_of_device_add_pmc_wake was ignoring
device's own nvidia,pmc-wakeup attribute when
child nodes were present. Process own attribute
first before processing child nodes.
- T21x wake support is through DT
and does not use built-in wakeups table
- tegra210-comms-p2530-0930.dtsi has
WAKE8 in bcmdhd_wlan node
Bug
200298115
Bug
1811733
Bug
200306539
Change-Id: Id14cca693c7eb05c09969fdd8256aa72e2067327
Reviewed-on: http://git-master/r/
1470483
(cherry picked from commit
aa931b2cb27cad77d5b83e928f5402bbb9a682dc)
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: http://git-master/r/
1488524
Tested-by: R Raj Kumar <rrajk@nvidia.com>
Reviewed-by: Joseph Lo <josephl@nvidia.com>
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
int child_node_num, i = 0;
child_node_num = of_get_child_count(dev->of_node);
- if (child_node_num == 0) {
- while (!of_parse_phandle_with_args(dev->of_node,
- "nvidia,pmc-wakeup",
- "#nvidia,wake-cells",
- i++, &ph_args)) {
- tegra_pmc_add_wakeup_event(&ph_args, dev, dev->of_node);
- of_node_put(ph_args.np);
- }
- } else {
+ while (!of_parse_phandle_with_args(dev->of_node,
+ "nvidia,pmc-wakeup",
+ "#nvidia,wake-cells",
+ i++, &ph_args)) {
+ tegra_pmc_add_wakeup_event(&ph_args, dev, dev->of_node);
+ of_node_put(ph_args.np);
+ }
+ if (child_node_num > 0) {
for_each_child_of_node(dev->of_node, np) {
i = 0;
while (!of_parse_phandle_with_args(np,