Hi Chris, On Fri, Mar 17, 2017 at 2:48 PM, Chris Brandt <Chris.Brandt@xxxxxxxxxxx> wrote: > On Friday, March 17, 2017, Geert Uytterhoeven wrote: >> So in the absence of an "rtc0" clock in the device node (you don't have >> "clock-names" properties in the rtc devvice node yet), it will fall back >> to clk_get_sys(), and will find the global "rtc0" clock. Unless you call >> it "rtc"... >> >> Most drivers using a single clock just pass NULL instead of a name, so it >> will match the first clock found. >> >> I think the simplest solution is to check if your device is instantiated >> from DT (pdev->dev.of_node != NULL), and pass NULL (or "fck", when you add >> multiple clocks to the DT bindings) to devm_clk_get() if that's the case. > > OK, so leave current SuperH code the way it is, but add the case for > (pdev->dev.of_node != NULL) and do things the 'new way' so I can have > an RTC clock name of "rtc". Indeed. > Question: Is your idea to add all the clocks (X1, X3, EXTAL), but put the > first one as the peripheral clock (the one that runs the register interface 'p0')? Which one is the peripheral clock doesn't matter if you use clock-names. The convention is to use "fck" for the functional clock of the device. 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