From: Johan Jonker <jbx6244@gmail.com>
To: kever.yang@rock-chips.com
Cc: sjg@chromium.org, philipp.tomsich@vrull.eu, lukma@denx.de,
marex@denx.de, u-boot@lists.denx.de
Subject: [PATCH v1 13/17] rockchip: adc: make adc branch compile in SPL
Date: Sun, 8 May 2022 17:08:21 +0200 [thread overview]
Message-ID: <20220508150825.21711-14-jbx6244@gmail.com> (raw)
In-Reply-To: <20220508150825.21711-1-jbx6244@gmail.com>
Make the ADC branch compile in SPL.
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
---
drivers/Makefile | 3 ++-
drivers/adc/Kconfig | 29 +++++++++++++++++++++++++++++
drivers/adc/Makefile | 4 ++--
3 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 4e7cf284..e79bbe29 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -40,6 +40,7 @@ obj-$(CONFIG_$(SPL_)FPGA) += fpga/
ifndef CONFIG_TPL_BUILD
ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_ADC) += adc/
obj-$(CONFIG_SPL_CPU) += cpu/
obj-$(CONFIG_SPL_CRYPTO) += crypto/
obj-$(CONFIG_SPL_MPC8XXX_INIT_DDR) += ddr/fsl/
@@ -71,7 +72,7 @@ endif
ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
-obj-y += adc/
+obj-$(CONFIG_ADC) += adc/
obj-y += ata/
obj-y += bus/
obj-$(CONFIG_DM_DEMO) += demo/
diff --git a/drivers/adc/Kconfig b/drivers/adc/Kconfig
index e719c38b..68e0d2d3 100644
--- a/drivers/adc/Kconfig
+++ b/drivers/adc/Kconfig
@@ -1,5 +1,6 @@
config ADC
bool "Enable ADC drivers using Driver Model"
+ depends on DM
help
This enables ADC API for drivers, which allows driving ADC features
by single and multi-channel methods for:
@@ -11,8 +12,23 @@ config ADC
- support supply's phandle with auto-enable
- supply polarity setting in fdt
+config SPL_ADC
+ bool "Enable ADC drivers using Driver Model in SPL"
+ depends on SPL_DM
+ help
+ This enables ADC API for drivers, which allows driving ADC features
+ by single and multi-channel methods in SPL for:
+ - start/stop/get data for conversion of a single-channel selected by
+ a number or multi-channels selected by a bitmask
+ - get data mask (ADC resolution)
+ ADC reference Voltage supply options:
+ - methods for get Vdd/Vss reference Voltage values with polarity
+ - support supply's phandle with auto-enable
+ - supply polarity setting in fdt
+
config ADC_EXYNOS
bool "Enable Exynos 54xx ADC driver"
+ depends on ADC
help
This enables basic driver for Exynos ADC compatible with Exynos54xx.
It provides:
@@ -22,6 +38,7 @@ config ADC_EXYNOS
config ADC_SANDBOX
bool "Enable Sandbox ADC test driver"
+ depends on ADC
help
This enables driver for Sandbox ADC device emulation.
It provides:
@@ -31,6 +48,7 @@ config ADC_SANDBOX
config SARADC_MESON
bool "Enable Amlogic Meson SARADC driver"
+ depends on ADC
imply REGMAP
help
This enables driver for Amlogic Meson SARADC.
@@ -41,6 +59,7 @@ config SARADC_MESON
config SARADC_ROCKCHIP
bool "Enable Rockchip SARADC driver"
+ depends on ADC
help
This enables driver for Rockchip SARADC.
It provides:
@@ -48,6 +67,16 @@ config SARADC_ROCKCHIP
- 1O or 12 bits resolution
- Up to 1MSPS of sample rate
+config SPL_SARADC_ROCKCHIP
+ bool "Enable Rockchip SARADC driver in SPL"
+ depends on SPL_ADC
+ help
+ This enables driver for Rockchip SARADC in SPL.
+ It provides:
+ - 2~6 analog input channels
+ - 1O or 12 bits resolution
+ - Up to 1MSPS of sample rate
+
config STM32_ADC
bool "Enable STMicroelectronics STM32 ADC driver"
depends on ADC && (STM32H7 || ARCH_STM32MP)
diff --git a/drivers/adc/Makefile b/drivers/adc/Makefile
index c1387f3a..43788c48 100644
--- a/drivers/adc/Makefile
+++ b/drivers/adc/Makefile
@@ -4,9 +4,9 @@
# Przemyslaw Marczak <p.marczak@samsung.com>
#
-obj-$(CONFIG_ADC) += adc-uclass.o
+obj-y += adc-uclass.o
obj-$(CONFIG_ADC_EXYNOS) += exynos-adc.o
obj-$(CONFIG_ADC_SANDBOX) += sandbox.o
-obj-$(CONFIG_SARADC_ROCKCHIP) += rockchip-saradc.o
+obj-$(CONFIG_$(SPL_)SARADC_ROCKCHIP) += rockchip-saradc.o
obj-$(CONFIG_SARADC_MESON) += meson-saradc.o
obj-$(CONFIG_STM32_ADC) += stm32-adc.o stm32-adc-core.o
--
2.20.1
next prev parent reply other threads:[~2022-05-08 15:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 15:08 [PATCH v1 00/17] Add rk3066 ADC and USB support Johan Jonker
2022-05-08 15:08 ` [PATCH v1 01/17] rockchip: spl: fix reloc gd and FDT blob pointer Johan Jonker
2022-05-08 15:08 ` [PATCH v1 02/17] rockchip: spl: allow more boot devices Johan Jonker
2022-05-08 15:08 ` [PATCH v1 03/17] rockchip: spl-boot-order: add usb boot option Johan Jonker
2022-05-08 15:08 ` [PATCH v1 04/17] rockchip: board: allow spl compile for usb init functions Johan Jonker
2022-05-08 15:08 ` [PATCH v1 05/17] rockchip: usb: gadget: rockusb: enable spl compile Johan Jonker
2022-05-08 15:08 ` [PATCH v1 06/17] rockchip: configs: mk808: add spl usb configs Johan Jonker
2022-05-08 15:08 ` [PATCH v1 07/17] arm: dts: rockchip: mk808: add adc usb required properties for spl Johan Jonker
2022-05-08 15:08 ` [PATCH v1 08/17] rockchip: adc: enable spl compile class driver Johan Jonker
2022-05-08 15:08 ` [PATCH v1 09/17] rockchip: adc: reduce error notifications from " Johan Jonker
2022-05-08 15:08 ` [PATCH v1 10/17] rockchip: adc: enable spl compile rockchip-saradc driver Johan Jonker
2022-05-08 15:08 ` [PATCH v1 11/17] rockchip: adc: fix adc timer Johan Jonker
2022-05-08 15:08 ` [PATCH v1 12/17] rockchip: adc: fix the hangups Johan Jonker
2022-05-08 15:08 ` Johan Jonker [this message]
2022-05-08 15:08 ` [PATCH v1 14/17] rockchip: adc: move config items in a sub menu Johan Jonker
2022-05-08 15:08 ` [PATCH v1 15/17] rockchip: rk3066: config nand data pins in spl Johan Jonker
2022-05-08 15:08 ` [PATCH v1 16/17] rockchip: rk3066: add recovery mode " Johan Jonker
2022-05-08 15:08 ` [PATCH v1 17/17] rockchip: configs: mk808: enable usb support Johan Jonker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220508150825.21711-14-jbx6244@gmail.com \
--to=jbx6244@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=philipp.tomsich@vrull.eu \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).