[PATCH v2 1/1] gpio: rockchip: Switch to use fwnode instead of of_node

Andy Shevchenko andriy.shevchenko at linux.intel.com
Wed Aug 31 12:03:17 PDT 2022


On Wed, Aug 31, 2022 at 05:11:36PM +0200, Bartosz Golaszewski wrote:
> On Wed, Aug 31, 2022 at 3:45 PM Andy Shevchenko
> <andriy.shevchenko at linux.intel.com> wrote:

...

> > -       bank->clk = of_clk_get(bank->of_node, 0);
> > +       bank->clk = of_clk_get(np, 0);
> 
> Why did you stop above? Why not regular clk_get here?

Indices... And there is no non-OF API for that.

> >         if (IS_ERR(bank->clk))
> >                 return PTR_ERR(bank->clk);
> >
> > @@ -668,7 +660,7 @@ static int rockchip_get_bank_data(struct rockchip_pin_bank *bank)
> >         if (id == GPIO_TYPE_V2 || id == GPIO_TYPE_V2_1) {
> >                 bank->gpio_regs = &gpio_regs_v2;
> >                 bank->gpio_type = GPIO_TYPE_V2;
> > -               bank->db_clk = of_clk_get(bank->of_node, 1);
> > +               bank->db_clk = of_clk_get(np, 1);
> 
> Ah, the clocks don't have names in DT? That's unfortunate...

Yeah...

-- 
With Best Regards,
Andy Shevchenko





More information about the Linux-rockchip mailing list