On 08/25, Rafał Miłecki wrote: > On 24 August 2016 at 10:47, Stephen Boyd <sboyd@xxxxxxxxxxxxxx> 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 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html