* [PATCH] iio: adc: ad_sigma_delta: allow COMPILE_TEST in isolation
@ 2026-06-08 9:02 Radu Sabau via B4 Relay
2026-06-08 10:04 ` Nuno Sá
0 siblings, 1 reply; 2+ messages in thread
From: Radu Sabau via B4 Relay @ 2026-06-08 9:02 UTC (permalink / raw)
To: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko
Cc: linux-iio, linux-kernel, Radu Sabau
From: Radu Sabau <radu.sabau@analog.com>
AD_SIGMA_DELTA is a hidden tristate that can only be enabled by
selecting drivers (AD7124, AD7192, etc.), all of which require SPI.
This prevents compile-testing the library code directly with allmodconfig
or by manually enabling it with COMPILE_TEST.
Add a prompt string guarded by "if COMPILE_TEST" so the symbol becomes
directly selectable when COMPILE_TEST is set.
Also add an explicit "depends on SPI" since the ad_sigma_delta library
directly calls SPI core symbols such as spi_bus_lock(), spi_bus_unlock(),
and spi_sync_locked().
Signed-off-by: Radu Sabau <radu.sabau@analog.com>
---
drivers/iio/adc/Kconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index a9dedbb8eb46..329d1f6e5106 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -33,7 +33,8 @@ config AB8500_GPADC
and USB voltages integral to the U8500 platform.
config AD_SIGMA_DELTA
- tristate
+ tristate "Analog Devices Sigma-Delta Modulator support" if COMPILE_TEST
+ depends on SPI
select IIO_BUFFER
select IIO_BUFFER_DMAENGINE
select IIO_TRIGGERED_BUFFER
---
base-commit: 4549871118cf616eecdd2d939f78e3b9e1dddc48
change-id: 20260608-ad_sigma_delta_spi-6063f200195b
Best regards,
--
Radu Sabau <radu.sabau@analog.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: adc: ad_sigma_delta: allow COMPILE_TEST in isolation
2026-06-08 9:02 [PATCH] iio: adc: ad_sigma_delta: allow COMPILE_TEST in isolation Radu Sabau via B4 Relay
@ 2026-06-08 10:04 ` Nuno Sá
0 siblings, 0 replies; 2+ messages in thread
From: Nuno Sá @ 2026-06-08 10:04 UTC (permalink / raw)
To: radu.sabau
Cc: Jonathan Cameron, David Lechner, Nuno Sá, Andy Shevchenko,
linux-iio, linux-kernel
On Mon, Jun 08, 2026 at 12:02:54PM +0300, Radu Sabau via B4 Relay wrote:
> From: Radu Sabau <radu.sabau@analog.com>
>
> AD_SIGMA_DELTA is a hidden tristate that can only be enabled by
> selecting drivers (AD7124, AD7192, etc.), all of which require SPI.
> This prevents compile-testing the library code directly with allmodconfig
> or by manually enabling it with COMPILE_TEST.
>
> Add a prompt string guarded by "if COMPILE_TEST" so the symbol becomes
> directly selectable when COMPILE_TEST is set.
>
> Also add an explicit "depends on SPI" since the ad_sigma_delta library
> directly calls SPI core symbols such as spi_bus_lock(), spi_bus_unlock(),
> and spi_sync_locked().
>
> Signed-off-by: Radu Sabau <radu.sabau@analog.com>
> ---
LGTM,
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/adc/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
> index a9dedbb8eb46..329d1f6e5106 100644
> --- a/drivers/iio/adc/Kconfig
> +++ b/drivers/iio/adc/Kconfig
> @@ -33,7 +33,8 @@ config AB8500_GPADC
> and USB voltages integral to the U8500 platform.
>
> config AD_SIGMA_DELTA
> - tristate
> + tristate "Analog Devices Sigma-Delta Modulator support" if COMPILE_TEST
> + depends on SPI
> select IIO_BUFFER
> select IIO_BUFFER_DMAENGINE
> select IIO_TRIGGERED_BUFFER
>
> ---
> base-commit: 4549871118cf616eecdd2d939f78e3b9e1dddc48
> change-id: 20260608-ad_sigma_delta_spi-6063f200195b
>
> Best regards,
> --
> Radu Sabau <radu.sabau@analog.com>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-08 10:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 9:02 [PATCH] iio: adc: ad_sigma_delta: allow COMPILE_TEST in isolation Radu Sabau via B4 Relay
2026-06-08 10:04 ` Nuno Sá
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox