From 2ed8790e8b4c5cbf0ef52124bc94b41da9f78fe3 Mon Sep 17 00:00:00 2001 From: Benjamin Geiger Date: Thu, 12 Dec 2024 14:21:51 +0100 Subject: [PATCH] drivers: adc: fix IF_ENABLED macro usage in ADS1X1X trigger The ADC_ADS1X1X_TRIGGER macro was defined without an explicit value, preventing ALERT/RDY pin configuration even when alert_rdy_gpios were properly defined in devicetree. This occurred because the IF_ENABLED macro specifically requires macros to be defined as 1, not just defined empty. Fixed this by explicitly defining ADC_ADS1X1X_TRIGGER as 1 when alert_rdy_gpios properties are present in devicetree. Signed-off-by: Benjamin Geiger --- drivers/adc/adc_ads1x1x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/adc/adc_ads1x1x.c b/drivers/adc/adc_ads1x1x.c index f984de435b9..594b275c10d 100644 --- a/drivers/adc/adc_ads1x1x.c +++ b/drivers/adc/adc_ads1x1x.c @@ -26,7 +26,7 @@ LOG_MODULE_REGISTER(ADS1X1X, CONFIG_ADC_LOG_LEVEL); DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY(ti_ads1015, alert_rdy_gpios) || \ DT_ANY_COMPAT_HAS_PROP_STATUS_OKAY(ti_ads1014, alert_rdy_gpios) -#define ADC_ADS1X1X_TRIGGER +#define ADC_ADS1X1X_TRIGGER 1 #endif