drivers: clock_control: Update drivers to use devicetree Kconfig symbol

Update clock_control drivers to use DT_HAS_<compat>_ENABLED Kconfig
symbol to expose the driver and enable it by default based on
devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
This commit is contained in:
Kumar Gala 2022-07-22 01:11:20 -05:00 committed by Carles Cufí
parent 83a2b590fe
commit 47bb8c14dc
18 changed files with 36 additions and 21 deletions

View file

@ -7,8 +7,8 @@ if SOC_FAMILY_ARM
menuconfig CLOCK_CONTROL_BEETLE
bool "BEETLE Clock Control"
depends on SOC_SERIES_BEETLE
default y if SOC_SERIES_BEETLE
default y
depends on DT_HAS_ARM_BEETLE_SYSCON_ENABLED
help
Enable driver for Reset & Clock Control subsystem found
in STM32F4 family of MCUs

View file

@ -5,7 +5,8 @@
config CLOCK_CONTROL_CAVS
bool "Intel CAVS clock control"
depends on SOC_FAMILY_INTEL_ADSP
default y
depends on DT_HAS_INTEL_CAVS_SHIM_CLKCTL_ENABLED
select CAVS_CLOCK
help
Driver for the CAVS clocks. Allow type of clock (and

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_ESP32
bool "ESP32 Clock driver"
depends on SOC_ESP32 || SOC_ESP32S2 || SOC_ESP32C3
default y
depends on DT_HAS_ESPRESSIF_ESP32_RTC_ENABLED
help
Enable support for ESP32 clock driver.

View file

@ -5,7 +5,8 @@
config CLOCK_CONTROL_LITEX
bool "LiteX MMCM clock control"
depends on SOC_RISCV32_LITEX_VEXRISCV
default y
depends on DT_HAS_LITEX_CLK_ENABLED
help
This option enables LiteX clock control driver.
It gives ability to change clock parameters

View file

@ -5,7 +5,8 @@
menuconfig CLOCK_CONTROL_LPC11U6X
bool "LPC11U6X Reset and clock control"
depends on SOC_SERIES_LPC11U6X
default y
depends on DT_HAS_NXP_LPC11U6X_SYSCON_ENABLED
help
Enable driver for reset and clock control used in
LPC11U6X MCUs

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_CCM
bool "MCUX CCM driver"
depends on HAS_MCUX_CCM
default y
depends on DT_HAS_NXP_IMX_CCM_ENABLED
help
Enable support for mcux ccm driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_CCM_REV2
bool "MCUX CCM Rev 2 driver"
depends on HAS_MCUX_CCM_REV2
default y
depends on DT_HAS_NXP_IMX_CCM_REV2_ENABLED
help
Enable support for mcux ccm rev 2 driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_MCG
bool "MCUX MCG driver"
depends on HAS_MCG
default y
depends on DT_HAS_NXP_KINETIS_MCG_ENABLED
help
Enable support for mcux mcg driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_PCC
bool "MCUX PCC driver"
depends on HAS_MCUX_PCC
default y
depends on DT_HAS_NXP_KINETIS_PCC_ENABLED
help
Enable support for MCUX PCC driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_SCG
bool "MCUX SCG driver"
depends on HAS_MCUX_SCG
default y
depends on DT_HAS_NXP_KINETIS_SCG_ENABLED
help
Enable support for mcux scg driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_SIM
bool "MCUX SIM driver"
depends on HAS_MCUX_SIM
default y
depends on DT_HAS_NXP_KINETIS_SIM_ENABLED
help
Enable support for mcux sim driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCUX_SYSCON
bool "MCUX LPC clock driver"
depends on HAS_MCUX_SYSCON
default y
depends on DT_HAS_NXP_LPC_SYSCON_ENABLED
help
Enable support for mcux clock driver.

View file

@ -5,7 +5,8 @@
config CLOCK_CONTROL_NPCX
bool "NPCX clock controller driver"
depends on SOC_FAMILY_NPCX
default y
depends on DT_HAS_NUVOTON_NPCX_PCC_ENABLED
help
Enable support for NPCX clock controller driver.

View file

@ -12,9 +12,9 @@ config CLOCK_CONTROL_NRF_FORCE_ALT
menuconfig CLOCK_CONTROL_NRF
bool "NRF Clock controller support"
depends on SOC_COMPATIBLE_NRF
select NRFX_CLOCK if !CLOCK_CONTROL_NRF_FORCE_ALT
default y
depends on DT_HAS_NORDIC_NRF_CLOCK_ENABLED
select NRFX_CLOCK if !CLOCK_CONTROL_NRF_FORCE_ALT
help
Enable support for the Nordic Semiconductor nRFxx series SoC clock
driver.

View file

@ -3,6 +3,7 @@
config CLOCK_CONTROL_RCAR_CPG_MSSR
bool "RCar CPG MSSR driver"
depends on SOC_FAMILY_RCAR
default y
depends on DT_HAS_RENESAS_R8A7795_CPG_MSSR_ENABLED
help
Enable support for Renesas RCar CPG MSSR driver.

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_RV32M1_PCC
bool "RV32M1 PCC driver"
depends on SOC_OPENISA_RV32M1_RISCV32
default y
depends on DT_HAS_OPENISA_RV32M1_PCC_ENABLED
help
Enable support for RV32M1 PCC driver.

View file

@ -17,7 +17,6 @@ if CLOCK_CONTROL_STM32_CUBE
DT_STM32_HSE_CLOCK := $(dt_nodelabel_path,clk_hse)
DT_STM32_HSE_CLOCK_FREQ := $(dt_node_int_prop_int,$(DT_STM32_HSE_CLOCK),clock-frequency)
DT_COMPAT_ST_MUX_CLOCK := st,stm32-clock-mux
config CLOCK_STM32_HSE_CLOCK
int "HSE clock value"
@ -36,7 +35,8 @@ config CLOCK_STM32_HSE_CLOCK
config CLOCK_STM32_MUX
bool "STM32 clock mux driver"
default $(dt_compat_enabled,$(DT_COMPAT_ST_MUX_CLOCK))
default y
depends on DT_HAS_ST_STM32_CLOCK_MUX_ENABLED
help
Enable driver for STM32 clock mux which don't match an
existing clock hardware block but allows to select a clock

View file

@ -5,6 +5,7 @@
config CLOCK_CONTROL_MCHP_XEC
bool "MCHP XEC PCR clock control driver"
depends on SOC_SERIES_MEC172X
default y
depends on DT_HAS_MICROCHIP_XEC_PCR_ENABLED
help
Enable support for Microchip XEC PCR clock driver.