Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: renesas: r9a06g032: Probe possible children

The clock controller device on r9a06g032 takes all the memory range that
is described as being a system controller. This range contains many
different (unrelated?) registers besides the ones belonging to the clock
controller, that can necessitate to be accessed from other peripherals.

For instance, the dmamux registers are there. The dmamux "device" will
be described as a child node of the clock/system controller node, which
means we need the top device driver (the clock controller driver in this
case) to populate its children manually. In case of error when
populating the children, we do not fail the probe on purpose to keep the
clk driver up and running.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20220427095653.91804-7-miquel.raynal@bootlin.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Miquel Raynal and committed by
Vinod Koul
2182066d 134d9c52

+5
+5
drivers/clk/renesas/r9a06g032-clocks.c
··· 16 16 #include <linux/math64.h> 17 17 #include <linux/of.h> 18 18 #include <linux/of_address.h> 19 + #include <linux/of_platform.h> 19 20 #include <linux/platform_device.h> 20 21 #include <linux/pm_clock.h> 21 22 #include <linux/pm_domain.h> ··· 996 995 return error; 997 996 998 997 sysctrl_priv = clocks; 998 + 999 + error = of_platform_populate(np, NULL, NULL, dev); 1000 + if (error) 1001 + dev_err(dev, "Failed to populate children (%d)\n", error); 999 1002 1000 1003 return 0; 1001 1004 }