Hi Simoda-san, Chris, On Fri, May 10, 2019 at 6:17 AM Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx> wrote: > > From: Chris Brandt, Sent: Friday, May 10, 2019 5:12 AM > > > > The RZ/A2 has an optional dedicated 48MHz clock input for the PLL. > > If a clock node named 'usb_x1' exists and set to non-zero, then we can > > assume we want it use it. > > > > Signed-off-by: Chris Brandt <chris.brandt@xxxxxxxxxxx> > > --- > > v2: > > * use 'usb_x1' clock node instead of 'renesas,uses_usb_x1' property > > --- > > drivers/phy/renesas/phy-rcar-gen3-usb2.c | 14 ++++++++++++++ > > @@ -630,6 +637,13 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev) > > } > > } > > > > + usb_x1_clk = of_find_node_by_name(NULL, "usb_x1"); > > + if (usb_x1_clk) { > > + of_property_read_u32(usb_x1_clk, "clock-frequency", &freq_usb); > > + if (freq_usb) > > + channel->uses_usb_x1 = true; > > + } > > + > > We need to call of_node_put(usb_x1_clk); here. > > By the way, we can also use devm_clk_get() for it like the following driver: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/clk/renesas/rcar-usb2-clock-sel.c#n135 +1 devm_clk_get() and clk_get_rate() is the way to go. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds