lkml.org 
[lkml]   [2015]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v3 03/18] clocksource: Add NPS400 timers driver
Date
From: Daniel Lezcano [mailto:daniel.lezcano@linaro.org] 
Sent: Friday, December 04, 2015 11:13 AM


>It would be cleaner to define a fixed clock and then add a phandle in the DT.

> timer_clk: timer_clk {
> #clock-cells = <0>;
> compatible = "fixed-clock";
> clock-frequency = <123456789>;
> };

> timer {
> compatible = "ezchip,nps400-timer";
> clocks = <&timer_clk>;
> }

>That will result in the same code than the other drivers.

> clk = of_clk_get(np, 0);
> if (IS_ERR(clk)) {
> pr_err("%s: invalid clock\n", np->full_name);
> return;
> }

> rate = clk_get_rate(clk);

Seem like my driver comes before "fixed-clock" driver so I failed since I got no clocksource provider.
How can this be solved?

-Noam
\
 
 \ /
  Last update: 2015-12-08 14:21    [W:2.135 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site