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 <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2021-04-13 00:20:43 +02:00 committed by Ioannis Glaropoulos
commit b142a47f73
2 changed files with 3 additions and 2 deletions

View file

@ -3,7 +3,6 @@
menuconfig REGULATOR menuconfig REGULATOR
bool "Regulator drivers" bool "Regulator drivers"
default $(dt_compat_enabled,$(DT_COMPAT_REGULATOR_FIXED))
help help
Include drivers for current/voltage regulators in system config Include drivers for current/voltage regulators in system config

View file

@ -1,7 +1,9 @@
# Copyright 2020 Peter Bigot Consulting, LLC # Copyright 2020 Peter Bigot Consulting, LLC
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
menuconfig REGULATOR_FIXED DT_COMPAT_REGULATOR_FIXED := regulator-fixed
config REGULATOR_FIXED
bool "GPIO-controlled regulators" bool "GPIO-controlled regulators"
default $(dt_compat_enabled,$(DT_COMPAT_REGULATOR_FIXED)) default $(dt_compat_enabled,$(DT_COMPAT_REGULATOR_FIXED))
depends on GPIO depends on GPIO