diff mbox series

[v3,15/16] button: add missing ADC dependency for BUTTON_ADC

Message ID 20240304-rk3588-saradc-v3-15-7424e2ed5d3b@theobroma-systems.com
State Accepted
Delegated to: Kever Yang
Headers show
Series rockchip: add support for SARADCv2 and RK806 PMIC and regulators | expand

Commit Message

Quentin Schulz March 4, 2024, 11:30 a.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

The BUTTON_ADC symbol guards the compilation of button-adc driver whose
name very well makes it explicit that it requires ADC support to be
enabled.

Fix build issue of button-adc driver when ADC support isn't enabled by
making sure it cannot be built without ADC support.

Cc: Quentin Schulz <foss+uboot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 drivers/button/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Kever Yang March 12, 2024, 3:50 a.m. UTC | #1
On 2024/3/4 19:30, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> The BUTTON_ADC symbol guards the compilation of button-adc driver whose
> name very well makes it explicit that it requires ADC support to be
> enabled.
>
> Fix build issue of button-adc driver when ADC support isn't enabled by
> making sure it cannot be built without ADC support.
>
> Cc: Quentin Schulz <foss+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   drivers/button/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/button/Kconfig b/drivers/button/Kconfig
> index 097b05f822e..3918b05ae03 100644
> --- a/drivers/button/Kconfig
> +++ b/drivers/button/Kconfig
> @@ -12,6 +12,7 @@ config BUTTON
>   config BUTTON_ADC
>   	bool "Button adc"
>   	depends on BUTTON
> +	depends on ADC
>   	help
>   	  Enable support for buttons which are connected to Analog to Digital
>   	  Converter device. The ADC driver must use driver model. Buttons are
>
diff mbox series

Patch

diff --git a/drivers/button/Kconfig b/drivers/button/Kconfig
index 097b05f822e..3918b05ae03 100644
--- a/drivers/button/Kconfig
+++ b/drivers/button/Kconfig
@@ -12,6 +12,7 @@  config BUTTON
 config BUTTON_ADC
 	bool "Button adc"
 	depends on BUTTON
+	depends on ADC
 	help
 	  Enable support for buttons which are connected to Analog to Digital
 	  Converter device. The ADC driver must use driver model. Buttons are