From b142a47f73639990a35857444b6207c467ae239e Mon Sep 17 00:00:00 2001 From: Johann Fischer Date: Tue, 13 Apr 2021 00:20:43 +0200 Subject: [PATCH] drivers: regulator: enable driver when compatible node is defined Add regulator compatibility string to Kconfig.fixed file and allow fixed regulator driver to be enabled when compatible node is defined. However, remove this option from common Kconfig as it is legitimate to enable/disable regulator support. Change menuconfig REGULATOR_FIXED to config since this menu nesting is not necessary. Signed-off-by: Johann Fischer --- drivers/regulator/Kconfig | 1 - drivers/regulator/Kconfig.fixed | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig index 8c879d4c4b8..5fd18e2f85c 100644 --- a/drivers/regulator/Kconfig +++ b/drivers/regulator/Kconfig @@ -3,7 +3,6 @@ menuconfig REGULATOR bool "Regulator drivers" - default $(dt_compat_enabled,$(DT_COMPAT_REGULATOR_FIXED)) help Include drivers for current/voltage regulators in system config diff --git a/drivers/regulator/Kconfig.fixed b/drivers/regulator/Kconfig.fixed index 2dcfbaab384..8bf82aacd1e 100644 --- a/drivers/regulator/Kconfig.fixed +++ b/drivers/regulator/Kconfig.fixed @@ -1,7 +1,9 @@ # Copyright 2020 Peter Bigot Consulting, LLC # SPDX-License-Identifier: Apache-2.0 -menuconfig REGULATOR_FIXED +DT_COMPAT_REGULATOR_FIXED := regulator-fixed + +config REGULATOR_FIXED bool "GPIO-controlled regulators" default $(dt_compat_enabled,$(DT_COMPAT_REGULATOR_FIXED)) depends on GPIO