Message ID | 20181119234706.5821-3-jcrouse@codeaurora.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | msm: clk: Define a special power domain for SDM845 GX | expand |
On 11/20/2018 5:17 AM, Jordan Crouse wrote: > In very extreme cases an individual gdsc may wish to override the > power domain enable or disable callback functions for their own > purposes. Only set the generic gdsc callback if the function pointers > are not already set. > > Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Looks good to me, Acked-by: Rajendra Nayak <rnayak@codeaurora.org> > --- > drivers/clk/qcom/gdsc.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c > index b6adca1f3918..7b55368b9a9c 100644 > --- a/drivers/clk/qcom/gdsc.c > +++ b/drivers/clk/qcom/gdsc.c > @@ -394,8 +394,10 @@ static int gdsc_init(struct gdsc *sc) > else > gdsc_clear_mem_on(sc); > > - sc->pd.power_off = gdsc_disable; > - sc->pd.power_on = gdsc_enable; > + if (!sc->pd.power_off) > + sc->pd.power_off = gdsc_disable; > + if (!sc->pd.power_on) > + sc->pd.power_on = gdsc_enable; > pm_genpd_init(&sc->pd, NULL, !on); > > return 0; >
diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c index b6adca1f3918..7b55368b9a9c 100644 --- a/drivers/clk/qcom/gdsc.c +++ b/drivers/clk/qcom/gdsc.c @@ -394,8 +394,10 @@ static int gdsc_init(struct gdsc *sc) else gdsc_clear_mem_on(sc); - sc->pd.power_off = gdsc_disable; - sc->pd.power_on = gdsc_enable; + if (!sc->pd.power_off) + sc->pd.power_off = gdsc_disable; + if (!sc->pd.power_on) + sc->pd.power_on = gdsc_enable; pm_genpd_init(&sc->pd, NULL, !on); return 0;
In very extreme cases an individual gdsc may wish to override the power domain enable or disable callback functions for their own purposes. Only set the generic gdsc callback if the function pointers are not already set. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> --- drivers/clk/qcom/gdsc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)