Quoting Rob Clark (2019-11-08 11:40:53) > On Fri, Nov 8, 2019 at 10:42 AM Stephen Boyd <sboyd@xxxxxxxxxx> wrote: > > > > So the scenario is DT describes the clk > > > > dpu_node { > > clocks = <&cc AHB_CLK>; > > clock-names = "iface"; > > } > > > > but the &cc node has a driver that doesn't probe? > > > > I believe in this scenario we return -EPROBE_DEFER because we assume we > > should wait for the clk driver to probe and provide the iface clk. See > > of_clk_get_hw_from_clkspec() and how it looks through a list of clk > > providers and tries to match the &cc phandle to some provider. > > > > Once the driver probes, the match will happen and we'll be able to look > > up the clk in the provider with __of_clk_get_hw_from_provider(). If > > the clk provider decides that there isn't a clk object, it will return > > NULL and then eventually clk_hw_create_clk() will turn the NULL return > > value into a NULL pointer to return from clk_get(). > > > > ok, that was the scenario I was worried about (since unclk'd register > access tends to be insta-reboot and hard to debug).. so I think it > should be ok to make dpu just ignore NULL clks. > > From a quick look, I think something like the attached (untested). > (Sorry, I'd just paste it inline but gmail somehow eats all the > whitespace when I do that :-/) Cool. Looks good to me.