RE: [PATCH v2 1/3] soc: renesas: rz-sysc: Register auxiliary device for PWRRDY power sequencer

From: Biju Das

Date: Fri Aug 07 2026 - 11:00:54 EST


Hi Geert,

Thanks for the feedback.

> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> 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 <biju.das.au@xxxxxxxxx> wrote:
> > From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> >
> > 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 <biju.das.jz@xxxxxxxxxxxxxx>
> > ---
> > 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 -- geert@xxxxxxxxxxxxxx
>
> 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