RE: [PATCH v2 1/3] soc: renesas: rz-sysc: Register auxiliary device for PWRRDY power sequencer
Biju Das <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <TY3PR01MB11346C78FE73B40A9049A394F86D12@TY3PR01MB11346.jpnprd01.prod.outlook.com> |
Hi Geert, Thanks for the feedback. > -----Original Message----- > From: Geert Uytterhoeven <[email protected]> > Sent: 07 August 2026 15:12 > Subject: Re: [PATCH v2 1/3] soc: renesas: rz-sysc: Register auxiliary device for PWRRDY power sequencer > > Hi Biju, > > On Wed, 29 Jul 2026 at 11:31, Biju <[email protected]> wrote: > > From: Biju Das <[email protected]> > > > > Some RZ SoCs (e.g. RZ/G3L) have a PWRRDY register that is controlled > > through a power sequencer rather than directly by the SYSC driver. > > > > Add a pwrrdy_pwrseq flag to struct rz_sysc_soc_id_init_data to mark > > SoCs with this property, and set it for RZ/G3L. When set, > > rz_sysc_probe() registers a "pwrseq-pwrrdy" auxiliary device so a > > dedicated driver can handle the PWRRDY sequencing, with automatic > > teardown via devm_add_action_or_reset(). > > > > Signed-off-by: Biju Das <[email protected]> > > --- > > v1->v2: > > * Switched to devm_auxiliary_device_create(). > > * Added regmap parameter to rz_sysc_pwrrdy_pwrseq_init(),so that regmap > > can be passed as platform data. > > Thanks for the update! > > > --- a/drivers/soc/renesas/rz-sysc.c > > +++ b/drivers/soc/renesas/rz-sysc.c > > > @@ -84,6 +85,22 @@ static int rz_sysc_soc_init(struct rz_sysc *sysc, const struct of_device_id *mat > > return 0; > > } > > > > +static int rz_sysc_pwrrdy_pwrseq_init(struct device *dev, struct regmap *regmap, > > + const struct rz_sysc_init_data > > +*data) { > > + const struct rz_sysc_soc_id_init_data *soc_data = data->soc_id_init_data; > > + struct auxiliary_device *adev; > > + > > + if (!soc_data->pwrrdy_pwrseq) > > + return 0; > > + > > + adev = devm_auxiliary_device_create(dev, "pwrseq-pwrrdy", > > + (__force void *)regmap); > > I don't think you need a cast (copied from a driver passing an __iomem pointer?) You are correct, will drop the casting in next version. Cheers, Biju > > > + if (!adev) > > + return -ENODEV; > > + > > + return 0; > > +} > > + > > static const struct of_device_id rz_sysc_match[] = { #ifdef > > CONFIG_SYSC_R9A08G045 > > { .compatible = "renesas,r9a08g045-sysc", .data = > > &rzg3s_sysc_init_data }, > > 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