Patch "clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     clk-qcom-gdsc-bump-parent-usage-count-when-gdsc-is-f.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b9b3c8e27ba053a342c95c19b4e99a23c2ea09d0
Author: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
Date:   Wed Jul 13 14:28:18 2022 -0700

    clk: qcom: gdsc: Bump parent usage count when GDSC is found enabled
    
    [ Upstream commit 41fff779d7948147f2440c4bb134cdf8b45b22d7 ]
    
    When a GDSC is found to be enabled at boot the pm_runtime state will
    be unbalanced as the GDSC is later turned off. Fix this by increasing
    the usage counter on the power-domain, in line with how we handled the
    regulator state.
    
    Fixes: 1b771839de05 ("clk: qcom: gdsc: enable optional power domain support")
    Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
    Acked-by: Stephen Boyd <sboyd@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220713212818.130277-1-bjorn.andersson@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
index 44520efc6c72..2db0938f8dd3 100644
--- a/drivers/clk/qcom/gdsc.c
+++ b/drivers/clk/qcom/gdsc.c
@@ -420,6 +420,14 @@ static int gdsc_init(struct gdsc *sc)
 				return ret;
 		}
 
+		/* ...and the power-domain */
+		ret = gdsc_pm_runtime_get(sc);
+		if (ret) {
+			if (sc->rsupply)
+				regulator_disable(sc->rsupply);
+			return ret;
+		}
+
 		/*
 		 * Votable GDSCs can be ON due to Vote from other masters.
 		 * If a Votable GDSC is ON, make sure we have a Vote.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux