Re: [PATCH v4 4/6] regulator: Add Renesas RZ/G2L USB VBUS regulator driver

Geert Uytterhoeven
2024-07-11T14:40:20Z

Hi Biju,

On Sun, Jun 16, 2024 at 12:54 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> As per the RZ/G2L HW manual, VBUSEN can be controlled by the VBOUT
> bit of the VBUS Control Register. This register is mapped in the reset
> framework. The reset driver expose this register as regmap and instantiates
> this driver. The consumer will use the regulator API to control the VBOUT
> bit as the control need to be done in the atomic context.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Thanks for your patch, which is now commit 84fbd6198766336f
("regulator: Add Renesas RZ/G2L USB VBUS regulator driver")
in regulator/for-next.

> --- a/drivers/regulator/Kconfig
> +++ b/drivers/regulator/Kconfig
> @@ -1634,6 +1634,15 @@ config REGULATOR_UNIPHIER
> help
> Support for regulators implemented on Socionext UniPhier SoCs.
>
> +config REGULATOR_RZG2L_VBCTRL
> + tristate "Renesas RZ/G2L USB VBUS regulator driver"
> + depends on ARCH_RZG2L || COMPILE_TEST
> + depends on OF
> + select REGMAP_MMIO
> + default ARCH_RZG2L

As the "rzg2l-usb-vbus-regulator" platform device is only created by
drivers/reset/reset-rzg2l-usbphy-ctrl.c, perhaps this should be made
stricter by using "default RESET_RZG2L_USBPHY_CTRL"?

Alternatively, RESET_RZG2L_USBPHY_CTRL could select
RESET_RZG2L_USBPHY_CTRL if REGULATOR. Can RESET_RZG2L_USBPHY_CTRL
work without REGULATOR_RZG2L_VBCTRL? If not, RESET_RZG2L_USBPHY_CTRL
should depend on REGULATOR, too.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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