RE: [PATCH v2 4/9] clk: renesas: rzg2l: Add support for divider flags
Biju Das <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-clk,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <TY3PR01MB11346182516BEFA440C6DEC6486A52@TY3PR01MB11346.jpnprd01.prod.outlook.com> |
Hi Geert, Thanks for the feedback. > -----Original Message----- > From: Geert Uytterhoeven <[email protected]> > Sent: 14 August 2026 13:34 > Subject: Re: [PATCH v2 4/9] clk: renesas: rzg2l: Add support for divider flags > > Hi Biju, > > On Tue, 11 Aug 2026 at 20:27, Biju <[email protected]> wrote: > > From: Biju Das <[email protected]> > > > > Add support for passing divider flags apart from clock flags from soc > > specific clock drivers. > > > > Reviewed-by: Geert Uytterhoeven <[email protected]> > > Signed-off-by: Biju Das <[email protected]> > > --- > > v1->v2: > > * Collected tag. > > * Fixed a check patch warning by using (_div_flags) in DEF_DIV_FLAGS > > macro. > > Thanks for the update! > > > --- a/drivers/clk/renesas/rzg2l-cpg.h > > +++ b/drivers/clk/renesas/rzg2l-cpg.h > > @@ -112,6 +112,7 @@ struct cpg_core_clk { > > notifier_fn_t notifier; > > u32 core_flags; > > u32 mux_flags; > > + u32 div_flags; > > int num_parents; > > }; > > > > @@ -168,11 +169,18 @@ enum clk_types { #define DEF_DIV(_name, _id, > > _parent, _conf, _dtable) \ > > DEF_TYPE(_name, _id, CLK_TYPE_DIV, .conf = _conf, \ > > .parent = _parent, .dtable = _dtable, \ > > - .core_flags = CLK_DIVIDER_HIWORD_MASK) > > + .core_flags = 0, \ > > + .div_flags = CLK_DIVIDER_HIWORD_MASK) > > This can be simplified to: > > DEF_DIV_FLAGS(_name, _id, _parent, _conf, _dtable, 0, 0) > > I will do that while queuing in renesas-clk for v7.4. Thanks for taking care this. Cheers, Biju > > > #define DEF_DIV_RO(_name, _id, _parent, _conf, _dtable) \ > > DEF_TYPE(_name, _id, CLK_TYPE_DIV, .conf = _conf, \ > > .parent = _parent, .dtable = _dtable, \ > > - .core_flags = CLK_DIVIDER_READ_ONLY) > > + .core_flags = 0, \ > > + .div_flags = CLK_DIVIDER_READ_ONLY) #define > > +DEF_DIV_FLAGS(_name, _id, _parent, _conf, _dtable, _flags, _div_flags) \ > > + DEF_TYPE(_name, _id, CLK_TYPE_DIV, .conf = _conf, \ > > + .parent = _parent, .dtable = _dtable, \ > > + .core_flags = _flags, \ > > + .div_flags = CLK_DIVIDER_HIWORD_MASK | (_div_flags)) > > #define DEF_G3S_DIV(_name, _id, _parent, _conf, _sconf, _dtable, _invalid_rate, \ > > _max_rate, _clk_flags, _notif) \ > > DEF_TYPE(_name, _id, CLK_TYPE_G3S_DIV, .conf = _conf, .sconf = > > _sconf, \ > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] > > In personal conversations with technical people, I call myself a hacker. But when I'm talking to > journalists I just say "programmer" or something like that. > -- Linus Torvalds