Re: [PATCH v2 01/11] base: power: Add generic OF-based power domain look-up

From: Tomasz Figa
Date: Wed Mar 05 2014 - 06:47:41 EST


Hi Ulf,

On 05.03.2014 08:19, Ulf Hansson wrote:
@@ -2177,3 +2181,297 @@ void pm_genpd_init(struct generic_pm_domain *genpd,
list_add(&genpd->gpd_list_node, &gpd_list);
mutex_unlock(&gpd_list_lock);
}
+
+#ifdef CONFIG_PM_GENERIC_DOMAINS_OF

Do we need a new config for this? Can't we just use CONFIG_OF?


I guess we could, but initially it would have to be CONFIG_OF && !CONFIG_ARCH_EXYNOS until patch 03/11 converts Exynos to use the common code.

+ if (ret < 0) {
+ dev_err(dev, "failed to add to power domain %s: %d",
+ pd->name, ret);
+ return ret;
+ }
+
+ pm_genpd_dev_need_restore(dev, true);

So this will reflect the device as being inactive, which I think is
the wrong approach.

Usually we should expect drivers that's being probed successfully to
leave their devices in active state, right?

It depends on domain power state, but actually it seems to be already handled in __pm_genpd_add_device(), so this line might be not needed indeed.

Strangely enough, it seemed to be needed on Exynos for correct operation, but maybe in the meantime some fixes in genpd code showed up. This will need some extra testing.

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/