From: Yepuri Siddu <yepuri.siddu@oss.qualcomm.com>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Imran Shaik <imran.shaik@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
quic_mohamull@quicinc.com, quic_hbandi@quicinc.com
Subject: Re: [PATCH 1/2] Bluetooth: hci_qca: Add WCN clock management for pwrseq-based power path
Date: Tue, 29 Sep 2026 15:49:41 +0530 [thread overview]
Message-ID: <e3ae21db-b777-4d3f-9587-50687d297abc@oss.qualcomm.com> (raw)
In-Reply-To: <CAFEp6-1J_nnD1OY=GBET19p9+j28n9LFmt5CgoiyWr7FVSmOFQ@mail.gmail.com>
On 9/29/2026 3:33 PM, Loic Poulain wrote:
> On Fri, Sep 25, 2026 at 8:21 AM Yepuri Siddu
> <yepuri.siddu@oss.qualcomm.com> wrote:
>>
>> RPMCC previously kept WCN clocks enabled via proxy votes, so the pwrseq
>> power path in hci_qca did not need to explicitly manage the clock.
>> With proxy vote removal, each consumer must explicitly enable and disable
>> its required clocks.
>>
>> Extend the pwrseq-based power path to acquire and manage an optional
>> WCN clock. In qca_serdev_probe(), acquire the clock using
>> devm_clk_get_optional(). In qca_regulator_enable(), enable the clock
>> after a successful pwrseq_enable() with proper rollback on failure.
>> In qca_power_off(), disable the clock before pwrseq_disable().
>>
>> Targets that do not define a clock in DTS are unaffected since
>> devm_clk_get_optional() returns NULL and all clock operations are
>> guarded accordingly.
>>
>> Signed-off-by: Yepuri Siddu <yepuri.siddu@oss.qualcomm.com>
>> ---
>> drivers/bluetooth/hci_qca.c | 23 ++++++++++++++++++++---
>> 1 file changed, 20 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
>> index 7089e9b639b2..489a059e519a 100644
>> --- a/drivers/bluetooth/hci_qca.c
>> +++ b/drivers/bluetooth/hci_qca.c
>> @@ -2265,6 +2265,8 @@ static void qca_power_off(struct hci_uart *hu)
>> }
>>
>> if (power && power->pwrseq) {
>> + if (qcadev->susclk)
>> + clk_disable_unprepare(qcadev->susclk);
>> pwrseq_disable(power->pwrseq);
>> set_bit(QCA_BT_OFF, &qca->flags);
>> return;
>> @@ -2324,8 +2326,17 @@ static int qca_regulator_enable(struct qca_serdev *qcadev)
>> struct qca_power *power = qcadev->bt_power;
>> int ret;
>>
>> - if (power->pwrseq)
>> - return pwrseq_enable(power->pwrseq);
>> + if (power->pwrseq) {
>> + ret = pwrseq_enable(power->pwrseq);
>> + if (ret)
>> + return ret;
>> + if (qcadev->susclk) {
>> + ret = clk_prepare_enable(qcadev->susclk);
>
> Why is susclk guarded by the pwrseq? They seem unrelated to me.
You are right. On further thought, the clock belongs to the WCN hardware
and its power sequencing is already handled by the wcn3988-pmu driver.
So the hci_qca driver does not need to manage it at all.
In v2 we dropped the hci_qca changes and moved the clock property to the
wcn3988-pmu node in DTS instead:
https://lore.kernel.org/all/20260929-bt-wcn-clk-enable-v2-1-7a90902f3df5@oss.qualcomm.com/
Thanks,
Siddu
next prev parent reply other threads:[~2026-09-29 10:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-25 6:13 [PATCH 0/2] Bluetooth: hci_qca: Add WCN clock enable/disable support for Shikra Yepuri Siddu
2026-09-25 6:13 ` [PATCH 1/2] Bluetooth: hci_qca: Add WCN clock management for pwrseq-based power path Yepuri Siddu
2026-09-25 6:27 ` sashiko-bot
2026-09-29 10:03 ` Loic Poulain
2026-09-29 10:19 ` Yepuri Siddu [this message]
2026-09-25 6:13 ` [PATCH 2/2] arm64: dts: qcom: shikra: Add WCN clock to Bluetooth node Yepuri Siddu
2026-09-25 6:26 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3ae21db-b777-4d3f-9587-50687d297abc@oss.qualcomm.com \
--to=yepuri.siddu@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imran.shaik@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
--cc=quic_hbandi@quicinc.com \
--cc=quic_mohamull@quicinc.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox