diff mbox series

[v3,5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs

Message ID 20240611110402.58104-6-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series Add support for USB VBUS control for RZ/G2L SoCs | expand

Commit Message

Biju Das June 11, 2024, 11:04 a.m. UTC
Use regulator_set_hardware_enable_register() for controlling VBUS enable
for RZ/G2L alike SoCs in interrupt context.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
 * Replaced regulator's regmap API with newly introduced
   regulator_set_hardware_enable_register to enable/disable regulator
   in interrupt context.
 * Dropped using "usb_vbus-supply"
 * Used regulator driver's regmap to handle VBUS.
 drivers/phy/renesas/phy-rcar-gen3-usb2.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series


diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index fbab6ac0f0d1..634b2b058e5f 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -188,6 +188,9 @@  static void rcar_gen3_enable_vbus_ctrl(struct rcar_gen3_chan *ch, int vbus)
 	dev_vdbg(ch->dev, "%s: %08x, %d\n", __func__, val, vbus);
 	if (ch->soc_no_adp_ctrl) {
+		if (ch->vbus)
+			regulator_set_hardware_enable_register(ch->vbus, vbus);
 		vbus_ctrl_reg = USB2_VBCTRL;
 		vbus_ctrl_val = USB2_VBCTRL_VBOUT;