[PATCH v5 3/5] soc: st: stm32mp2-syscfg: register the clock device
Amelie Delaunay
amelie.delaunay at foss.st.com
Thu Dec 3 02:01:18 PST 2026
On 12/1/26 09:33, Gabriel Fernandez wrote:
> From: Dario Binacchi <dario.binacchi at amarulasolutions.com>
>
> The STM32MP23x and STM32MP25x SYSCFG provides the LTDC pixel clock mux,
> whose driver is an auxiliary driver since the SYSCFG node is bound to
> this driver.
>
> Create the auxiliary device for the clock driver.
>
> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
> [gabriel.fernandez at foss.st.com: create the device on STM32MP23x too]
> Signed-off-by: Gabriel Fernandez <gabriel.fernandez at foss.st.com>
> ---
> drivers/soc/st/Kconfig | 1 +
> drivers/soc/st/stm32mp2-syscfg.c | 19 ++++++++++++++++++-
> 2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/st/Kconfig b/drivers/soc/st/Kconfig
> index 2a9d6a77be45..62bbe8c63238 100644
> --- a/drivers/soc/st/Kconfig
> +++ b/drivers/soc/st/Kconfig
> @@ -5,6 +5,7 @@ config SOC_STM32MP2
> tristate "STM32MP2 SoC family support"
> depends on ARCH_STM32 || COMPILE_TEST
> default ARCH_STM32 && ARM64
> + select AUXILIARY_BUS
> select SOC_BUS
> help
> If you say yes here, you get support for the ST STM32MP2 family
> diff --git a/drivers/soc/st/stm32mp2-syscfg.c b/drivers/soc/st/stm32mp2-syscfg.c
> index 770321a4a6f7..f77f41e38d97 100644
> --- a/drivers/soc/st/stm32mp2-syscfg.c
> +++ b/drivers/soc/st/stm32mp2-syscfg.c
> @@ -3,13 +3,30 @@
> * Copyright 2026 Marek Vasut
> */
>
> +#include <linux/auxiliary_bus.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
>
> static int stm32mp2_syscfg_probe(struct platform_device *pdev)
> {
> - return devm_of_platform_populate(&pdev->dev);
> + struct device *dev = &pdev->dev;
> + int ret;
> +
> + ret = devm_of_platform_populate(dev);
> + if (ret)
> + return ret;
Minor improvement, return dev_err_probe() here?
Anyway, since the existing driver already returns the error without
logging it,
Reviewed-by: Amelie Delaunay <amelie.delaunay at foss.st.com>
Thanks,
Amélie
> +
> + /* The LTDC pixel clock mux needs the SYSCFG clock inputs */
> + if (!of_property_present(dev->of_node, "clocks"))
> + return 0;
> +
> + if (!devm_auxiliary_device_create(dev, "clk", NULL))
> + return dev_err_probe(dev, -ENODEV,
> + "failed to register the clock device\n");
> +
> + return 0;
> }
>
> static const struct of_device_id stm32mp2_syscfg_ids[] = {
>
More information about the linux-arm-kernel
mailing list