[RFC PATCH] PM / Domains: Allow devices to generic pm domain regardless of power domain state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch allow devices to generic pm domain without reference
to the state of pm domains.

Generic PM domain framework can add devices to pm domain with GPD_STATE_ACTIVE
state.

If I don't want to enable the specific pm domain during kernel boot for power
saving,
so I can't add device to specific pm domain. Usually, the works ,which
initialize pm domain
and add device to pm domain, is operated during early kernel boot.

I think that we allow device to pm domain regardless of the state of pm domain
and
pm domain have to be enabled when devices included in pm domain executes
probe() or runtime pm.

Please let me know reason that why should we enable the pm domain when add
devices to it?

Best regards,
Chanwoo Choi

Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx>
Singed-off-by: MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx>
Singed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
 drivers/base/power/domain.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 6790cf7..3ee34ad 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1093,11 +1093,6 @@ int pm_genpd_add_device(struct generic_pm_domain *genpd,
struct device *dev)
 
 	genpd_acquire_lock(genpd);
 
-	if (genpd->status == GPD_STATE_POWER_OFF) {
-		ret = -EINVAL;
-		goto out;
-	}
-
 	if (genpd->prepared_count > 0) {
 		ret = -EAGAIN;
 		goto out;
-- 
1.7.0.4


_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux