lkml.org 
[lkml]   [2021]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFCv1 3/8] phy: amlogic: meson8b-usb2: Use phy exit callback function
Date
Reorder the code for phy bulkclk disable in .exit callback function.

Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
drivers/phy/amlogic/phy-meson8b-usb2.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c
index d48171b0b32e..2b32a3eabccf 100644
--- a/drivers/phy/amlogic/phy-meson8b-usb2.c
+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
@@ -164,6 +164,15 @@ static int phy_meson8b_usb2_init(struct phy *phy)
return 0;
}

+static int phy_meson8b_usb2_exit(struct phy *phy)
+{
+ struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
+
+ clk_bulk_disable_unprepare(priv->num_clks, priv->clks);
+
+ return 0;
+}
+
static int phy_meson8b_usb2_power_on(struct phy *phy)
{
struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
@@ -220,13 +229,13 @@ static int phy_meson8b_usb2_power_off(struct phy *phy)
REG_DBG_UART_SET_IDDQ,
REG_DBG_UART_SET_IDDQ);

- clk_bulk_disable_unprepare(priv->num_clks, priv->clks);

return 0;
}

static const struct phy_ops phy_meson8b_usb2_ops = {
.init = phy_meson8b_usb2_init,
+ .exit = phy_meson8b_usb2_exit,
.power_on = phy_meson8b_usb2_power_on,
.power_off = phy_meson8b_usb2_power_off,
.owner = THIS_MODULE,
--
2.31.1
\
 
 \ /
  Last update: 2021-06-17 21:43    [W:0.178 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site