Hi Claudiu, On Fri, 8 Aug 2025 at 08:18, Claudiu <claudiu.beznea@xxxxxxxxx> wrote: > From: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx> > > The RZ/G3E system controller has various registers that control or report > some properties specific to individual IPs. The regmap is registered as a > syscon device to allow these IP drivers to access the registers through the > regmap API. > > As other RZ SoCs might have custom read/write callbacks or max-offsets, > register a custom regmap configuration. > > Signed-off-by: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx> > [claudiu.beznea: > - do not check the match->data validity in rz_sysc_probe() as it is > always valid > - dinamically allocate regmap_cfg] > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx> > --- > > Changes in v4: > - adjusted the patch description by dropping "add" from > "add register a custom regmap configuration" > - updated the list of changes from Claudiu Beznea > - dynamically allocate the regmap_config as proposed at [2] > - this patch is needed for proper function of USB (as proposed in this > series) that being the reason it is introduced here, as well > > [2] https://lore.kernel.org/all/CAMuHMdVyf3Xtpw=LWHrnD2CVQX4xYm=FBHvY_dx9OesHDz5zNg@xxxxxxxxxxxxxx/ Thanks for the update! > --- a/drivers/soc/renesas/rz-sysc.c > +++ b/drivers/soc/renesas/rz-sysc.c = > @@ -117,7 +125,26 @@ static int rz_sysc_probe(struct platform_device *pdev) > return PTR_ERR(sysc->base); > > sysc->dev = dev; > - return rz_sysc_soc_init(sysc, match); > + ret = rz_sysc_soc_init(sysc, match); > + if (ret) > + return ret; > + > + regmap_cfg = devm_kzalloc(dev, sizeof(*regmap_cfg), GFP_KERNEL); > + if (!regmap_cfg) > + return -ENOMEM; Is there any specific reason you decided to allocate regmap_cfg separately, instead of embedding it into struct rz_sysc? The rest LGTM. 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