Re: [PATCH v8 2/2] clk: wpcm450: Add Nuvoton WPCM450 clock/reset controller driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Jonathan Neuschäfer (2023-07-22 08:15:43)
> On Thu, Jul 20, 2023 at 05:02:15PM -0700, Stephen Boyd wrote:
> > Quoting Jonathan Neuschäfer (2023-04-28 12:02:26)
> > > diff --git a/drivers/clk/clk-wpcm450.c b/drivers/clk/clk-wpcm450.c
> [...]
> > > +static unsigned long wpcm450_clk_pll_recalc_rate(struct clk_hw *hw,
> > > +                                                unsigned long parent_rate)
> > > +{
> > > +       struct wpcm450_clk_pll *pll = to_wpcm450_clk_pll(hw);
[...]
> 
> > > +static const struct wpcm450_pll_data pll_data[] = {
> > > +       { "pll0", { .name = "ref" }, REG_PLLCON0, 0 },
> > 
> > This is new code, please don't use .name. Instead use .fw_name or .index with preference to
> > .index first and .hw if the pointer is available in this driver.
> 
> As far as I can see, .fw_name and .index depend on a struct device*
> being passed to clk_hw_register, which won't be available unless I
> actually convert the driver to a platform driver.

You can call of_clk_hw_register(), but a conversion to a platform driver
is preferred.

> 
> Not relying on .name would indeed be nice.

Cool.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux