# SPDX-FileCopyrightText: 2026 NXP
# SPDX-License-Identifier: Apache-2.0

# MUX (multiplexer) controller drivers configuration

menuconfig MUX
	bool "Multiplexer (MUX) drivers"
	help
	  Generic multiplexer controller subsystem. Provides a unified API
	  (mux_control_set, mux_state_apply) for signal routers.

if MUX

config MUX_INIT_PRIORITY
	int "MUX driver init priority"
	default 40
	help
	  Initialization priority for MUX controller drivers. MUX controllers
	  are providers that consumers (sensors, PWM, etc.) depend on through
	  devicetree, so this must be earlier (lower) than the init priority of
	  any consumer, e.g. KERNEL_INIT_PRIORITY_DEVICE.

config MUX_MAX_CELLS
	int "Maximum number of addressing cells in a mux specifier"
	default 4
	help
	  Upper bound on the addressing-cells length of a single mux-controls
	  or mux-states specifier. Used by the userspace syscall handlers to
	  allocate a fixed-size kernel-side copy of the cells array, avoiding
	  VLAs and capping the trusted-memory copy from userspace. Increase if
	  any controller binding requires more than this many addressing cells.

module = MUX
module-str = mux
source "subsys/logging/Kconfig.template.log_config"

comment "MUX Drivers"

# zephyr-keep-sorted-start
rsource "Kconfig.adi_adgm3121"
rsource "Kconfig.gpio"
rsource "Kconfig.nxp_inputmux"
rsource "Kconfig.nxp_trgmux"
rsource "Kconfig.nxp_xbar"
# zephyr-keep-sorted-stop

endif # MUX
