diff mbox

[v2] power: Fix unmet dependency on POWER_SUPPLY by POWER_RESET by uncoupling them

Message ID 1449459912-29482-1-git-send-email-k.kozlowski@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Krzysztof Kozlowski Dec. 7, 2015, 3:45 a.m. UTC
Currently the reset/power off handlers (POWER_RESET) and Adaptive Voltage
Scaling class (POWER_AVS) are not built when POWER_SUPPLY is disabled.
The POWER_RESET is also not visible in drivers main section of config.

However they do not really depend on power supply so they can be built
always. The objects for power supply drivers already depend on
particular Kconfig symbols so there is no need for any changes in
drivers/power/Makefile.

This allows selecting POWER_RESET from main drivers config section and
fixes following build warning (encountered on ARM exynos defconfig when
POWER_SUPPLY is disabled manually):

warning: (ARCH_HISI && ARCH_INTEGRATOR && ARCH_EXYNOS && ARCH_VEXPRESS && REALVIEW_DT) selects POWER_RESET which has unmet direct dependencies (POWER_SUPPLY)
warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)
warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON_POWEROFF which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)

Reported-by: Pavel Fedin <p.fedin@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

---

Changes since v1:
1. Follow Sebastian's suggestion of changing drivers/power to obj-y.
   This makes patch 2/2 obsolete and everything (POWER_RESET +
   POWER_AVS) is fixed here.
---
 drivers/Makefile      | 2 +-
 drivers/power/Kconfig | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

Comments

Sebastian Reichel Dec. 8, 2015, 1:39 p.m. UTC | #1
Hi,

On Mon, Dec 07, 2015 at 12:45:12PM +0900, Krzysztof Kozlowski wrote:
> Currently the reset/power off handlers (POWER_RESET) and Adaptive Voltage
> Scaling class (POWER_AVS) are not built when POWER_SUPPLY is disabled.
> The POWER_RESET is also not visible in drivers main section of config.
> 
> However they do not really depend on power supply so they can be built
> always. The objects for power supply drivers already depend on
> particular Kconfig symbols so there is no need for any changes in
> drivers/power/Makefile.
> 
> This allows selecting POWER_RESET from main drivers config section and
> fixes following build warning (encountered on ARM exynos defconfig when
> POWER_SUPPLY is disabled manually):
> 
> warning: (ARCH_HISI && ARCH_INTEGRATOR && ARCH_EXYNOS && ARCH_VEXPRESS && REALVIEW_DT) selects POWER_RESET which has unmet direct dependencies (POWER_SUPPLY)
> warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)
> warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON_POWEROFF which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF)
> 
> Reported-by: Pavel Fedin <p.fedin@samsung.com>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Thanks, queued.

-- Sebastian
diff mbox

Patch

diff --git a/drivers/Makefile b/drivers/Makefile
index 795d0ca714bf..8f5d076baeb0 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -106,7 +106,7 @@  obj-y				+= i2c/ media/
 obj-$(CONFIG_PPS)		+= pps/
 obj-$(CONFIG_PTP_1588_CLOCK)	+= ptp/
 obj-$(CONFIG_W1)		+= w1/
-obj-$(CONFIG_POWER_SUPPLY)	+= power/
+obj-y				+= power/
 obj-$(CONFIG_HWMON)		+= hwmon/
 obj-$(CONFIG_THERMAL)		+= thermal/
 obj-$(CONFIG_WATCHDOG)		+= watchdog/
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 2f944d742ed4..c031f901b497 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -509,8 +509,7 @@  config AXP20X_POWER
 	  This driver provides support for the power supply features of
 	  AXP20x PMIC.
 
-source "drivers/power/reset/Kconfig"
-
 endif # POWER_SUPPLY
 
+source "drivers/power/reset/Kconfig"
 source "drivers/power/avs/Kconfig"