lkml.org 
[lkml]   [2016]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5] clk: bcm: Add driver for BCM53573 ILP clock
On 08/25, Rafał Miłecki wrote:
> On 24 August 2016 at 10:47, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 08/23, Rafał Miłecki wrote:
> >> + }
> >> +
> >> + /* Disable measurement to save power */
> >> + writel(0x0, pmu + PMU_XTAL_FREQ_RATIO);
> >> +
> >> + avg = sum / num;
> >> +
> >> + return parent_rate * 4 / avg;
> >> +}
> >> +
> >> +static const struct clk_ops bcm53573_ilp_clk_ops = {
> >> + .enable = bcm53573_ilp_enable,
> >
> > No disable? Or .is_enabled?
>
> The beauty of working without datasheets... I'll compare initial reg
> state with one after enabling and see if there is sth obvious.
>
>

Ok.

> >
> > Can this be a platform driver instead?
>
> I guess it can. Should it? It's not clear to me when CLK_OF_DECLARE is
> preferred and when it's not.

We've been taking an approach of using CLK_OF_DECLARE() for clks
that must be registered for timers and interrupt controllers (as
these things are done before the device model is initialized),
and struct drivers otherwise. If the DT node has a mix of
timer/interrupt controller clks and other clks then
CLK_OF_DECLARE_DRIVER() can be used and then we can still have a
builtin driver.

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.044 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site