From 0cc8f93e8a41f0e05374b27ff89b1af321c437ce Mon Sep 17 00:00:00 2001 From: Gerson Fernando Budke Date: Thu, 31 Oct 2024 19:08:31 +0100 Subject: [PATCH] soc: atmel: Drop PINCTRL from Kconfig.defconfig This Kconfig has wrongly been added to defconfig files. It is not the right place for it. It has never been the right place for it. Drivers that need it should select the symbol in their Kconfig entries. Drop PINCTL from Kconfig.defconfig and add proper select at Kconfig.sam*. Fixes #78619 Signed-off-by: Gerson Fernando Budke --- drivers/adc/Kconfig.sam | 1 + drivers/adc/Kconfig.sam0 | 1 + drivers/adc/Kconfig.sam_afec | 1 + drivers/counter/Kconfig.sam | 1 + drivers/counter/Kconfig.sam0 | 1 + drivers/dac/Kconfig.sam | 1 + drivers/dac/Kconfig.sam0 | 1 + drivers/ethernet/Kconfig.sam_gmac | 1 + drivers/i2c/Kconfig | 2 ++ drivers/i2c/Kconfig.sam0 | 1 + drivers/i2c/Kconfig.sam_twihs | 1 + drivers/i2s/Kconfig.sam_ssc | 1 + drivers/memc/Kconfig.sam | 1 + drivers/pwm/Kconfig.sam | 1 + drivers/pwm/Kconfig.sam0 | 1 + drivers/sdhc/Kconfig.sam_hsmci | 1 + drivers/sensor/qdec_sam/Kconfig | 1 + drivers/serial/Kconfig.sam0 | 1 + drivers/serial/Kconfig.uart_sam | 1 + drivers/serial/Kconfig.usart_sam | 1 + drivers/spi/Kconfig.sam | 1 + drivers/spi/Kconfig.sam0 | 1 + drivers/timer/Kconfig.sam0_rtc | 1 + drivers/usb/device/Kconfig | 2 ++ soc/atmel/sam/Kconfig.defconfig | 3 --- soc/atmel/sam0/Kconfig.defconfig | 3 --- 26 files changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/adc/Kconfig.sam b/drivers/adc/Kconfig.sam index 20c1bd4249d..6eda9e6a557 100644 --- a/drivers/adc/Kconfig.sam +++ b/drivers/adc/Kconfig.sam @@ -5,6 +5,7 @@ config ADC_SAM bool "Atmel SAM series ADC Driver" default y depends on DT_HAS_ATMEL_SAM_ADC_ENABLED + select PINCTRL select ADC_CONFIGURABLE_INPUTS help Enable Atmel SAM MCU Family Analog-to-Digital Converter (ADC) driver. diff --git a/drivers/adc/Kconfig.sam0 b/drivers/adc/Kconfig.sam0 index c161f35bbf8..7b17f885c4b 100644 --- a/drivers/adc/Kconfig.sam0 +++ b/drivers/adc/Kconfig.sam0 @@ -5,6 +5,7 @@ config ADC_SAM0 bool "Atmel SAM0 series ADC Driver" default y depends on DT_HAS_ATMEL_SAM0_ADC_ENABLED + select PINCTRL select ADC_CONFIGURABLE_INPUTS help Enable Atmel SAM0 MCU Family Analog-to-Digital Converter (ADC) driver. diff --git a/drivers/adc/Kconfig.sam_afec b/drivers/adc/Kconfig.sam_afec index 388b1298ad0..9c93e36fc2f 100644 --- a/drivers/adc/Kconfig.sam_afec +++ b/drivers/adc/Kconfig.sam_afec @@ -7,6 +7,7 @@ config ADC_SAM_AFEC bool "SAM ADC Driver" default y depends on DT_HAS_ATMEL_SAM_AFEC_ENABLED + select PINCTRL help Enable Atmel SAM MCU Family Analog-to-Digital Converter (ADC) driver based on AFEC module. diff --git a/drivers/counter/Kconfig.sam b/drivers/counter/Kconfig.sam index cb4e0aeb091..5f253c86a7c 100644 --- a/drivers/counter/Kconfig.sam +++ b/drivers/counter/Kconfig.sam @@ -5,5 +5,6 @@ config COUNTER_SAM_TC bool "Atmel SAM MCU family counter (TC) driver" default y depends on DT_HAS_ATMEL_SAM_TC_ENABLED + select PINCTRL help Enable the Atmel SAM MCU family counter (TC) driver. diff --git a/drivers/counter/Kconfig.sam0 b/drivers/counter/Kconfig.sam0 index 7a42b3a7e5c..7ab2e51b7a3 100644 --- a/drivers/counter/Kconfig.sam0 +++ b/drivers/counter/Kconfig.sam0 @@ -5,6 +5,7 @@ config COUNTER_SAM0_TC32 bool "SAM0 series 32-bit basic timer driver" default y depends on DT_HAS_ATMEL_SAM0_TC32_ENABLED + select PINCTRL help Enable the SAM0 series timer counter (TC) driver in 32-bit wide mode. diff --git a/drivers/dac/Kconfig.sam b/drivers/dac/Kconfig.sam index e3328af8d15..b2451e3d9bd 100644 --- a/drivers/dac/Kconfig.sam +++ b/drivers/dac/Kconfig.sam @@ -6,5 +6,6 @@ config DAC_SAM bool "Atmel SAM DAC driver" default y depends on DT_HAS_ATMEL_SAM_DAC_ENABLED + select PINCTRL help Enable Atmel SAM MCU Family Digital Audio Converter (DAC) driver. diff --git a/drivers/dac/Kconfig.sam0 b/drivers/dac/Kconfig.sam0 index 1f018ab5821..ac86ff2b9cf 100644 --- a/drivers/dac/Kconfig.sam0 +++ b/drivers/dac/Kconfig.sam0 @@ -5,5 +5,6 @@ config DAC_SAM0 bool "Atmel SAM0 series DAC Driver" default y depends on DT_HAS_ATMEL_SAM0_DAC_ENABLED + select PINCTRL help Enables the Atmel SAM0 MCU Family Digital-to-Analog (DAC) driver. diff --git a/drivers/ethernet/Kconfig.sam_gmac b/drivers/ethernet/Kconfig.sam_gmac index 7037c313a00..aecb9488f25 100644 --- a/drivers/ethernet/Kconfig.sam_gmac +++ b/drivers/ethernet/Kconfig.sam_gmac @@ -12,6 +12,7 @@ menuconfig ETH_SAM_GMAC select NOCACHE_MEMORY if ARCH_HAS_NOCACHE_MEMORY_SUPPORT select MDIO select ETH_DSA_SUPPORT + select PINCTRL help Enable Atmel SAM MCU Family Ethernet driver. diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 86e7165bf08..ef43c9198de 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -177,6 +177,7 @@ config I2C_SAM_TWIM bool "Atmel SAM (TWIM) I2C driver" default y depends on DT_HAS_ATMEL_SAM_I2C_TWIM_ENABLED + select PINCTRL help Enable Atmel SAM MCU Family (TWIM) I2C bus driver. @@ -184,6 +185,7 @@ config I2C_SAM_TWI bool "Atmel SAM (TWI) I2C driver" default y depends on DT_HAS_ATMEL_SAM_I2C_TWI_ENABLED + select PINCTRL help Enable Atmel SAM MCU Family (TWI) I2C bus driver. diff --git a/drivers/i2c/Kconfig.sam0 b/drivers/i2c/Kconfig.sam0 index 0abad71360d..c7c62e0d954 100644 --- a/drivers/i2c/Kconfig.sam0 +++ b/drivers/i2c/Kconfig.sam0 @@ -5,6 +5,7 @@ menuconfig I2C_SAM0 bool "SAM0 series I2C SERCOM driver" default y depends on DT_HAS_ATMEL_SAM0_I2C_ENABLED + select PINCTRL help Enable the SAM0 series SERCOM I2C driver. diff --git a/drivers/i2c/Kconfig.sam_twihs b/drivers/i2c/Kconfig.sam_twihs index 5f1daa6f4c4..ebe78793135 100644 --- a/drivers/i2c/Kconfig.sam_twihs +++ b/drivers/i2c/Kconfig.sam_twihs @@ -7,5 +7,6 @@ config I2C_SAM_TWIHS bool "Atmel SAM (TWIHS) I2C driver" default y depends on DT_HAS_ATMEL_SAM_I2C_TWIHS_ENABLED + select PINCTRL help Enable Atmel SAM MCU Family (TWIHS) I2C bus driver. diff --git a/drivers/i2s/Kconfig.sam_ssc b/drivers/i2s/Kconfig.sam_ssc index 4226ba58bfb..212f8278f10 100644 --- a/drivers/i2s/Kconfig.sam_ssc +++ b/drivers/i2s/Kconfig.sam_ssc @@ -7,6 +7,7 @@ menuconfig I2S_SAM_SSC bool "Atmel SAM MCU family I2S (SSC) Bus Driver" default y depends on DT_HAS_ATMEL_SAM_SSC_ENABLED + select PINCTRL select DMA help Enable Inter Sound (I2S) bus driver for Atmel SAM MCU family based on diff --git a/drivers/memc/Kconfig.sam b/drivers/memc/Kconfig.sam index fef4f51040b..91707305dcd 100644 --- a/drivers/memc/Kconfig.sam +++ b/drivers/memc/Kconfig.sam @@ -5,5 +5,6 @@ config MEMC_SAM_SMC bool "Atmel Static Memory Controller (SMC)" default y depends on DT_HAS_ATMEL_SAM_SMC_ENABLED + select PINCTRL help Enable Atmel Static Memory Controller. diff --git a/drivers/pwm/Kconfig.sam b/drivers/pwm/Kconfig.sam index 839b6cb9de7..d34aa4924cc 100644 --- a/drivers/pwm/Kconfig.sam +++ b/drivers/pwm/Kconfig.sam @@ -7,5 +7,6 @@ config PWM_SAM bool "Atmel SAM MCU Family PWM Driver" default y depends on DT_HAS_ATMEL_SAM_PWM_ENABLED + select PINCTRL help Enable PWM driver for Atmel SAM MCUs. diff --git a/drivers/pwm/Kconfig.sam0 b/drivers/pwm/Kconfig.sam0 index bde4cf49021..8354983b51f 100644 --- a/drivers/pwm/Kconfig.sam0 +++ b/drivers/pwm/Kconfig.sam0 @@ -7,5 +7,6 @@ config PWM_SAM0_TCC bool "Atmel SAM0 MCU Family TCC PWM Driver" default y depends on DT_HAS_ATMEL_SAM0_TCC_PWM_ENABLED + select PINCTRL help Enable PWM driver for Atmel SAM0 MCUs using the TCC timer/counter. diff --git a/drivers/sdhc/Kconfig.sam_hsmci b/drivers/sdhc/Kconfig.sam_hsmci index fca9bafdaff..183e028cf48 100644 --- a/drivers/sdhc/Kconfig.sam_hsmci +++ b/drivers/sdhc/Kconfig.sam_hsmci @@ -5,6 +5,7 @@ config SAM_HSMCI bool "ATMEL SAM HSMCI driver" default y depends on DT_HAS_ATMEL_SAM_HSMCI_ENABLED + select PINCTRL select SDHC_SUPPORTS_NATIVE_MODE help Enable the ATMEL SAM HSMCI MMC/SD card driver. diff --git a/drivers/sensor/qdec_sam/Kconfig b/drivers/sensor/qdec_sam/Kconfig index 45daf9e56a5..4bb73b5143f 100644 --- a/drivers/sensor/qdec_sam/Kconfig +++ b/drivers/sensor/qdec_sam/Kconfig @@ -9,5 +9,6 @@ config QDEC_SAM default y depends on DT_HAS_ATMEL_SAM_TC_QDEC_ENABLED depends on SOC_FAMILY_ATMEL_SAM + select PINCTRL help Atmel SAM MCU family Quadrature Decoder (TC) driver. diff --git a/drivers/serial/Kconfig.sam0 b/drivers/serial/Kconfig.sam0 index eb6eaed670f..244180d6b7a 100644 --- a/drivers/serial/Kconfig.sam0 +++ b/drivers/serial/Kconfig.sam0 @@ -7,6 +7,7 @@ config UART_SAM0 bool "Atmel SAM0 series SERCOM USART driver" default y depends on DT_HAS_ATMEL_SAM0_UART_ENABLED + select PINCTRL select SERIAL_HAS_DRIVER select SERIAL_SUPPORT_INTERRUPT select SERIAL_SUPPORT_ASYNC if DT_HAS_ATMEL_SAM0_DMAC_ENABLED diff --git a/drivers/serial/Kconfig.uart_sam b/drivers/serial/Kconfig.uart_sam index 03900d9894c..347405af59b 100644 --- a/drivers/serial/Kconfig.uart_sam +++ b/drivers/serial/Kconfig.uart_sam @@ -8,6 +8,7 @@ config UART_SAM bool "Atmel SAM MCU family UART driver" default y depends on DT_HAS_ATMEL_SAM_UART_ENABLED + select PINCTRL select SERIAL_HAS_DRIVER select SERIAL_SUPPORT_INTERRUPT help diff --git a/drivers/serial/Kconfig.usart_sam b/drivers/serial/Kconfig.usart_sam index beea28e3abf..2ce6daa506f 100644 --- a/drivers/serial/Kconfig.usart_sam +++ b/drivers/serial/Kconfig.usart_sam @@ -7,6 +7,7 @@ config USART_SAM bool "Atmel SAM MCU family USART driver" default y depends on DT_HAS_ATMEL_SAM_USART_ENABLED + select PINCTRL select SERIAL_HAS_DRIVER select SERIAL_SUPPORT_INTERRUPT help diff --git a/drivers/spi/Kconfig.sam b/drivers/spi/Kconfig.sam index 78ff7c54265..90e8a6300ab 100644 --- a/drivers/spi/Kconfig.sam +++ b/drivers/spi/Kconfig.sam @@ -8,6 +8,7 @@ config SPI_SAM bool "Atmel SAM series SPI driver" default y depends on DT_HAS_ATMEL_SAM_SPI_ENABLED + select PINCTRL select GPIO help Enable support for the SAM SPI driver. diff --git a/drivers/spi/Kconfig.sam0 b/drivers/spi/Kconfig.sam0 index 314938221e0..819e5404e2e 100644 --- a/drivers/spi/Kconfig.sam0 +++ b/drivers/spi/Kconfig.sam0 @@ -7,6 +7,7 @@ config SPI_SAM0 bool "Atmel SAM0 series SERCOM SPI driver" default y depends on DT_HAS_ATMEL_SAM0_SPI_ENABLED + select PINCTRL select DMA if SPI_ASYNC help Enable support for the SAM0 SERCOM SPI driver. diff --git a/drivers/timer/Kconfig.sam0_rtc b/drivers/timer/Kconfig.sam0_rtc index d39e9ece84a..14c4ee73939 100644 --- a/drivers/timer/Kconfig.sam0_rtc +++ b/drivers/timer/Kconfig.sam0_rtc @@ -7,6 +7,7 @@ config SAM0_RTC_TIMER bool "Atmel SAM0 series RTC timer" default y depends on DT_HAS_ATMEL_SAM0_RTC_ENABLED + select PINCTRL select TICKLESS_CAPABLE help This module implements a kernel device driver for the Atmel SAM0 diff --git a/drivers/usb/device/Kconfig b/drivers/usb/device/Kconfig index 5658e5247d2..ab178195381 100644 --- a/drivers/usb/device/Kconfig +++ b/drivers/usb/device/Kconfig @@ -71,6 +71,7 @@ config USB_DC_SAM0 bool "SAM0 series USB Device Controller driver" default y depends on DT_HAS_ATMEL_SAM0_USB_ENABLED + select PINCTRL help SAM0 family USB device controller Driver. @@ -88,6 +89,7 @@ config USB_DC_SAM_USBC bool "SAM4L USBC Device Controller driver" default y depends on DT_HAS_ATMEL_SAM_USBC_ENABLED + select PINCTRL help SAM4L family USBC device controller Driver. diff --git a/soc/atmel/sam/Kconfig.defconfig b/soc/atmel/sam/Kconfig.defconfig index 49ad6145223..caa6bf86b90 100644 --- a/soc/atmel/sam/Kconfig.defconfig +++ b/soc/atmel/sam/Kconfig.defconfig @@ -14,9 +14,6 @@ config CLOCK_CONTROL config GPIO default y -config PINCTRL - default y - config SYS_CLOCK_HW_CYCLES_PER_SEC default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) diff --git a/soc/atmel/sam0/Kconfig.defconfig b/soc/atmel/sam0/Kconfig.defconfig index 2980bbe87c4..cc8094aa6f4 100644 --- a/soc/atmel/sam0/Kconfig.defconfig +++ b/soc/atmel/sam0/Kconfig.defconfig @@ -14,9 +14,6 @@ config GPIO config HWINFO_SAM0 default HWINFO -config PINCTRL - default y - config SYS_CLOCK_HW_CYCLES_PER_SEC default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)