From: Chris Morgan <macromor...@hotmail.com> Add kconfig options to enable ADC in SPL
Signed-off-by: Chris Morgan <macromor...@hotmail.com> --- common/spl/Kconfig | 7 +++++++ drivers/Makefile | 1 + drivers/adc/Makefile | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index c521b02f4a..ada9dcea5c 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -579,6 +579,13 @@ config SPL_FIT_IMAGE_TINY ensure this information is available to the next image invoked). +config SPL_ADC + bool "Support ADC drivers" + help + Enable ADC drivers in SPL. These drivers can allow the reading of + analog values from one or more channels. Enable this option to + build the drivers in drivers/adc as part of an SPL build. + config SPL_CACHE bool "Support CACHE drivers" help diff --git a/drivers/Makefile b/drivers/Makefile index bf73b7718c..81ba2c534e 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0+ +obj-$(CONFIG_$(SPL_)ADC) += adc/ obj-$(CONFIG_$(SPL_TPL_)BIOSEMU) += bios_emulator/ obj-$(CONFIG_$(SPL_TPL_)BLK) += block/ obj-$(CONFIG_$(SPL_TPL_)BOOTCOUNT_LIMIT) += bootcount/ diff --git a/drivers/adc/Makefile b/drivers/adc/Makefile index 5336c82097..9eb07769b0 100644 --- a/drivers/adc/Makefile +++ b/drivers/adc/Makefile @@ -4,7 +4,7 @@ # Przemyslaw Marczak <p.marc...@samsung.com> # -obj-$(CONFIG_ADC) += adc-uclass.o +obj-$(CONFIG_$(SPL_)ADC) += adc-uclass.o obj-$(CONFIG_ADC_EXYNOS) += exynos-adc.o obj-$(CONFIG_ADC_SANDBOX) += sandbox.o obj-$(CONFIG_SARADC_ROCKCHIP) += rockchip-saradc.o -- 2.34.1