Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1554923

Re: [PATCH V2 1/2] clk: qcom: gdsc: Add support for gdscs with HW control

From Rajendra Nayak <rnayak@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH V2 1/2] clk: qcom: gdsc: Add support for gdscs with HW control
Date 2017-01-10 05:50 +0100
Message-ID <sXWxI-59K-7@gated-at.bofh.it> (permalink)
References <sEQsN-72k-25@gated-at.bofh.it> <sEQsN-72k-23@gated-at.bofh.it> <sXEKt-2tb-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[]..

>>  static int gdsc_toggle_logic(struct gdsc *sc, bool en)
>>  {
>>  	int ret;
>> @@ -164,16 +171,28 @@ static int gdsc_enable(struct generic_pm_domain *domain)
>>  	 */
>>  	udelay(1);
>>  
>> +	/* Turn on HW trigger mode if supported */
>> +	if (sc->flags & HW_CTRL)
>> +		return gdsc_hwctrl(sc, true);
>> +
>>  	return 0;
>>  }
>>  
>>  static int gdsc_disable(struct generic_pm_domain *domain)
>>  {
>>  	struct gdsc *sc = domain_to_gdsc(domain);
>> +	int ret;
>>  
>>  	if (sc->pwrsts == PWRSTS_ON)
>>  		return gdsc_assert_reset(sc);
>>  
>> +	/* Turn off HW trigger mode if supported */
>> +	if (sc->flags & HW_CTRL) {
>> +		ret = gdsc_hwctrl(sc, false);
> 
> Looking in the downstream implementation the disabling of the hw control
> bit shouldn't be enough.
> 
> After disabling hw control bit we must have a 1us delay and polling for
> enabled PWR_ON bit with timeout of 100us, only then we should continue
> with disabling the GDSC in software controlled mode.

Stan, thats right. I will send a patch to fix this up right-away.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: [PATCH V2 1/2] clk: qcom: gdsc: Add support for gdscs with HW  control Stanimir Varbanov <stanimir.varbanov@linaro.org> - 2017-01-09 10:50 +0100
  Re: [PATCH V2 1/2] clk: qcom: gdsc: Add support for gdscs with HW  control Rajendra Nayak <rnayak@codeaurora.org> - 2017-01-10 05:50 +0100

csiph-web