From: Ulf Hansson Date: Mon, 20 Mar 2017 10:19:23 +0000 (+0100) Subject: PM / Domains: Don't warn about IRQ safe device for an always on PM domain X-Git-Tag: v4.13-rc2~27^2^3~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=075c37d59ecd4a8b7c9cb5570e90d5b538797ad2;p=platform%2Fkernel%2Flinux-exynos.git PM / Domains: Don't warn about IRQ safe device for an always on PM domain When an IRQ safe device is attached to a no sleep domain, genpd prints a warning once, as to indicate it is a suboptimal configuration from power consumption point of view. However the warning doesn't make sense for an always on domain, since it anyway remains powered on. Therefore, let's change to not print the warning for this configuration. Signed-off-by: Ulf Hansson Reviewed-by: Viresh Kumar Reviewed-by: Geert Uytterhoeven Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index c0318c1..0680793 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -132,8 +132,12 @@ static inline bool irq_safe_dev_in_no_sleep_domain(struct device *dev, ret = pm_runtime_is_irq_safe(dev) && !genpd_is_irq_safe(genpd); - /* Warn once if IRQ safe dev in no sleep domain */ - if (ret) + /* + * Warn once if an IRQ safe device is attached to a no sleep domain, as + * to indicate a suboptimal configuration for PM. For an always on + * domain this isn't case, thus don't warn. + */ + if (ret && !genpd_is_always_on(genpd)) dev_warn_once(dev, "PM domain %s will not be powered off\n", genpd->name);