mirror of
https://github.com/torvalds/linux.git
synced 2026-05-13 16:59:27 +02:00
The multiplexer subsystem was initially designed to be completely hidden, relying on consumers to "select MULTIPLEXER" explicitly. Drivers implementing multiplexers depend on this hidden symbol. This prevents users from manually enabling both the mux core and any of the multiplexer drivers. All multiplexer drivers in drivers/mux/ can operate standalone without a consumer. This is particularly useful in a device-tree, where a default state can be set through the idle-state property. Over time, several drivers have added "select MULTIPLEXER" dependencies, some of which require a mux and some consider it optional. v7.0-rc1 shows 15 such occurrences in Kconfig files, in a variety of subsystems. The natural step forward to allow enabling mux core and drivers would be adding a prompt and help text to the existing symbol. This violates the general Kbuild advice to avoid selecting visible symbols for all existing consumers of the mux core. Add the new config symbol MUX_CORE with a prompt and help text as a wrapper for users to enable manually. This avoids existing consumers automatically selecting a visible symbol. Change the MULTIPLEXER symbol from tristate to bool. This avoids complex dependencies if users were to attempt a configuration where the mux is a module but one of its consumers is built-in, as well as difficulties keeping the state of visible and invisible symbols in sync. Further convert the "menu ... depends on ..." structure to "if ... menu ... endmenu endif". These are functionally equivalent, but the new structure is more efficient and can support future source statements within the conditional block. Signed-off-by: Josua Mayer <josua@solid-run.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
76 lines
2.0 KiB
Plaintext
76 lines
2.0 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Multiplexer devices
|
|
#
|
|
|
|
config MULTIPLEXER
|
|
bool
|
|
|
|
config MUX_CORE
|
|
bool "Generic Multiplexer Support"
|
|
select MULTIPLEXER
|
|
help
|
|
This framework is designed to abstract multiplexer handling for
|
|
devices via various GPIO-, MMIO/Regmap or specific multiplexer
|
|
controller chips.
|
|
|
|
If unsure, say no.
|
|
|
|
if MULTIPLEXER
|
|
|
|
menu "Multiplexer drivers"
|
|
|
|
config MUX_ADG792A
|
|
tristate "Analog Devices ADG792A/ADG792G Multiplexers"
|
|
depends on I2C
|
|
help
|
|
ADG792A and ADG792G Wide Bandwidth Triple 4:1 Multiplexers
|
|
|
|
The driver supports both operating the three multiplexers in
|
|
parallel and operating them independently.
|
|
|
|
To compile the driver as a module, choose M here: the module will
|
|
be called mux-adg792a.
|
|
|
|
config MUX_ADGS1408
|
|
tristate "Analog Devices ADGS1408/ADGS1409 Multiplexers"
|
|
depends on SPI
|
|
help
|
|
ADGS1408 8:1 multiplexer and ADGS1409 double 4:1 multiplexer
|
|
switches.
|
|
|
|
To compile the driver as a module, choose M here: the module will
|
|
be called mux-adgs1408.
|
|
|
|
config MUX_GPIO
|
|
tristate "GPIO-controlled Multiplexer"
|
|
depends on GPIOLIB || COMPILE_TEST
|
|
help
|
|
GPIO-controlled Multiplexer controller.
|
|
|
|
The driver builds a single multiplexer controller using a number
|
|
of gpio pins. For N pins, there will be 2^N possible multiplexer
|
|
states. The GPIO pins can be connected (by the hardware) to several
|
|
multiplexers, which in that case will be operated in parallel.
|
|
|
|
To compile the driver as a module, choose M here: the module will
|
|
be called mux-gpio.
|
|
|
|
config MUX_MMIO
|
|
tristate "MMIO/Regmap register bitfield-controlled Multiplexer"
|
|
depends on OF
|
|
select REGMAP_MMIO
|
|
help
|
|
MMIO/Regmap register bitfield-controlled Multiplexer controller.
|
|
|
|
The driver builds multiplexer controllers for bitfields in either
|
|
a syscon register or a driver regmap register. For N bit wide
|
|
bitfields, there will be 2^N possible multiplexer states.
|
|
|
|
To compile the driver as a module, choose M here: the module will
|
|
be called mux-mmio.
|
|
|
|
endmenu
|
|
|
|
endif # MULTIPLEXER
|