From: Stanimir Varbanov Subject: Re: [PATCH v2] clk: qcom: gdsc: Fix handling of hw control enable/disable Date: Thu, 26 Jan 2017 23:31:03 +0200 Message-ID: References: <1485145581-517-1-git-send-email-rnayak@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1485145581-517-1-git-send-email-rnayak@codeaurora.org> Sender: linux-clk-owner@vger.kernel.org To: Rajendra Nayak , sboyd@codeaurora.org, mturquette@baylibre.com Cc: linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, sricharan@codeaurora.org List-Id: linux-arm-msm@vger.kernel.org Hi, Thanks for the patch! On 23.01.2017 06:26, Rajendra Nayak wrote: > Once a gdsc is brought in and out of HW control, there is a > power down and up cycle which can take upto 1us. Polling on > the gdsc status immediately after the hw control enable/disable > can mislead software/firmware to belive the gdsc is already either on > or off, while its yet to complete the power cycle. > To avoid this add a 1us delay post a enable/disable of HW control > mode. > > Also after the HW control mode is disabled, poll on the status to > check gdsc status reflects its 'on' before force disabling it > in software. > > Reported-by: Stanimir Varbanov > Signed-off-by: Rajendra Nayak > --- > drivers/clk/qcom/gdsc.c | 58 ++++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 45 insertions(+), 13 deletions(-) Reviewed and Tested-by: Stanimir Varbanov regards, Stan