All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: sunxi: select CONFIG_PM
@ 2023-01-30 13:04 ` Arnd Bergmann
  0 siblings, 0 replies; 12+ messages in thread
From: Arnd Bergmann @ 2023-01-30 13:04 UTC (permalink / raw)
  To: Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Arnd Bergmann, linux-arm-kernel, linux-sunxi, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

Selecting CONFIG_PM_GENERIC_DOMAINS without CONFIG_PM leads to a
build failure:

WARNING: unmet direct dependencies detected for PM_GENERIC_DOMAINS
  Depends on [n]: PM [=n]
  Selected by [y]:
  - SUN20I_PPU [=y] && (ARCH_SUNXI [=n] || COMPILE_TEST [=y])

drivers/base/power/domain_governor.c: In function 'default_suspend_ok':
drivers/base/power/domain_governor.c:85:24: error: 'struct dev_pm_info' has no member named 'ignore_children'
   85 |         if (!dev->power.ignore_children)
      |                        ^
drivers/base/power/domain.c: In function 'genpd_queue_power_off_work':
drivers/base/power/domain.c:657:20: error: 'pm_wq' undeclared (first use in this function)
  657 |         queue_work(pm_wq, &genpd->power_off_work);
      |                    ^~~~~

Unfortunately platforms are inconsistent between using 'select PM'
and 'depends on PM' here. CONFIG_PM is a user-visible symbol, so
in principle we should be using 'depends on', but on the other hand
using 'select' here is more common among drivers/soc. Go with the
majority for now, as this has a smaller risk of introducing circular
dependencies. We may need to clean this up for consistency later.

Fixes: 0e30ca5ab0a8 ("soc: sunxi: Add Allwinner D1 PPU driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/soc/sunxi/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/sunxi/Kconfig b/drivers/soc/sunxi/Kconfig
index 29e9ba2d520d..02d0b338feb3 100644
--- a/drivers/soc/sunxi/Kconfig
+++ b/drivers/soc/sunxi/Kconfig
@@ -23,6 +23,7 @@ config SUNXI_SRAM
 config SUN20I_PPU
 	bool "Allwinner D1 PPU power domain driver"
 	depends on ARCH_SUNXI || COMPILE_TEST
+	select PM
 	select PM_GENERIC_DOMAINS
 	help
 	  Say y to enable the PPU power domain driver. This saves power
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-02-04 16:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 13:04 [PATCH] soc: sunxi: select CONFIG_PM Arnd Bergmann
2023-01-30 13:04 ` Arnd Bergmann
2023-01-30 21:18 ` Jernej Škrabec
2023-01-30 21:18   ` Jernej Škrabec
2023-01-30 21:24   ` Arnd Bergmann
2023-01-30 21:24     ` Arnd Bergmann
2023-02-04  7:47 ` Randy Dunlap
2023-02-04  7:47   ` Randy Dunlap
2023-02-04 10:38   ` Arnd Bergmann
2023-02-04 10:38     ` Arnd Bergmann
2023-02-04 16:54     ` Randy Dunlap
2023-02-04 16:54       ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.