Re: [PATCH v3 5/9] regulator: renesas-usb-vbus-regulator: Add RZ/G3L VBUS regulator support
From: Geert Uytterhoeven
Date: Wed Jul 08 2026 - 04:30:04 EST
Hi Biju,
On Wed, 8 Jul 2026 at 10:10, Biju Das <biju.das.jz@xxxxxxxxxxxxxx> wrote:
> > From: Mark Brown <broonie@xxxxxxxxxx>
> > On Tue, Jul 07, 2026 at 03:36:37PM +0100, Biju wrote:
> > > From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> > >
> > > Add dual USB VBUS regulator support for the RZ/G3L (r9a08g046) SoC,
> > > which has two OTG controllers (one per port), unlike RZ/G3S which has only one.
> >
> > Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
>
> I have encountered compilation issue on x86 with compile_test,
> that build this driver as module.
>
> Looks like I cannot use two module_platform_driver definitions
> in a C file.
>
> I will switch to single init explicitly registering 2 drivers like [1]
>
> [1] https://elixir.bootlin.com/linux/v7.2-rc1/source/arch/sparc/kernel/central.c#L264
Why do you need two platform_driver instances?
Because of the different device names? You can use
platform_driver.id_table for named platform devices, just like you
use platform_driver.driver.of_match_table for DT.
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