]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
soc: tegra: pmc: DT add wake fix
authorBitan Biswas <bbiswas@nvidia.com>
Wed, 26 Apr 2017 12:37:08 +0000 (18:07 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Fri, 26 May 2017 02:45:24 +0000 (19:45 -0700)
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>
drivers/soc/tegra/pmc.c

index ad184ef174d177b59e00a08419f3c60c1041afef..b4ed6ed58b7348c47cf455c6cea1f82a3821ff33 100644 (file)
@@ -1563,15 +1563,14 @@ static void tegra_of_device_add_pmc_wake(struct device *dev)
        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,