From patchwork Tue Jun 11 11:04:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13693452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3C4EC27C75 for ; Tue, 11 Jun 2024 11:04:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=06a+zfRvjMMkoA288jJ70lJdDDh1nZo/6wFLm+31j0E=; b=WSr1yxdZGs2JzM rww/TfaXjejWM1ivSS770VKdTEORBsWBU5oE65CAmutetepltuLdC77Rf6PQrJFRtAYI20VgPow0H iEIadheH1YXnS+7tNeOgc1JajyrIo3f0/sXTl+8BBnbw/5tPNCGxvZpiEKBOwOoy76yVddgsgVZ63 p81C86M86SnpgCy0GGr9zGK5vDd0FAWmU/ncuDZHUW8JB0bSRTAhkLl4Ms8RpJorfM8uRESOLT3FX DKZj5IwcwzOh8JlZ81w8CnQGGHK1AfQ4iKyywUmwZ1sB+tDbUF6eWfK82//LgOzOiRYcj7CfiuyuU PPt4g1q43Tz+r+v69vhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGzIy-00000008ZQh-2Ie1; Tue, 11 Jun 2024 11:04:44 +0000 Received: from relmlor1.renesas.com ([210.160.252.171] helo=relmlie5.idc.renesas.com) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sGzIr-00000008ZMq-3klS for linux-phy@lists.infradead.org; Tue, 11 Jun 2024 11:04:42 +0000 X-IronPort-AV: E=Sophos;i="6.08,229,1712588400"; d="scan'208";a="207488227" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 11 Jun 2024 20:04:37 +0900 Received: from localhost.localdomain (unknown [10.226.93.49]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id A1D6440078D0; Tue, 11 Jun 2024 20:04:32 +0900 (JST) From: Biju Das To: Yoshihiro Shimoda Cc: Biju Das , Philipp Zabel , Liam Girdwood , Mark Brown , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "Geert Uytterhoeven devicetree @ vger . kernel . org" , linux-phy@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Prabhakar Mahadev Lad , Biju Das Subject: [PATCH v3 5/6] phy: renesas: phy-rcar-gen3-usb2: Control VBUS for RZ/G2L SoCs Date: Tue, 11 Jun 2024 12:04:01 +0100 Message-Id: <20240611110402.58104-6-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240611110402.58104-1-biju.das.jz@bp.renesas.com> References: <20240611110402.58104-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240611_040441_394924_84834EC0 X-CRM114-Status: UNSURE ( 8.21 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Use regulator_set_hardware_enable_register() for controlling VBUS enable for RZ/G2L alike SoCs in interrupt context. Signed-off-by: Biju Das --- v2->v3: * 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" v1->v2: * Used regulator driver's regmap to handle VBUS. --- drivers/phy/renesas/phy-rcar-gen3-usb2.c | 3 +++ 1 file changed, 3 insertions(+) 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; }