[PATCH v3 2/6] mux: Add helper functions for getting optional and selected mux-state
Josua Mayer
josua at solid-run.com
Sun Dec 21 02:37:47 PST 2025
Hi Ulf,
Am 17.12.25 um 14:38 schrieb Ulf Hansson:
> On Wed, 10 Dec 2025 at 18:39, Josua Mayer <josua at solid-run.com> wrote:
cut
>> /*
>> * Using subsys_initcall instead of module_init here to try to ensure - for
>> * the non-modular case - that the subsystem is initialized when mux consumers
>> diff --git a/include/linux/mux/consumer.h b/include/linux/mux/consumer.h
>> index 2e25c838f8312..a5da2e33a45c0 100644
>> --- a/include/linux/mux/consumer.h
>> +++ b/include/linux/mux/consumer.h
>> @@ -60,5 +60,9 @@ struct mux_control *devm_mux_control_get(struct device *dev,
>> const char *mux_name);
>> struct mux_state *devm_mux_state_get(struct device *dev,
>> const char *mux_name);
>> +struct mux_state *devm_mux_state_get_optional(struct device *dev,
>> + const char *mux_name);
>> +struct mux_state *devm_mux_state_get_optional_selected(struct device *dev,
>> + const char *mux_name);
> Seems like we need stub-functions of these too. Otherwise
> subsystems/drivers need to have a "depends on MULTIPLEXER" in their
> Kconfigs.
Currently the drivers that can use a mux select MULTIPLEXER in Kconfig.
There already exist a few mux helpers both for mux-state and for mux-control,
and they might all need stubs.
I'd prefer the restructuring of kconfig dependencies being independent from
adding mux-state functionality to renesas sdhi driver.
sincerely
Josua Mayer
More information about the linux-phy
mailing list