From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v7 2/8] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available'
Date: Mon, 05 Oct 2026 12:28:28 +0000 [thread overview]
Message-ID: <20261005122828.A89CD1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005-monza-wireless-v7-2-5a6de7662dcb@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] bluetooth: semantic mismatch in renaming power_ctrl_enabled to bt_en_available
--
commit a629aed3c3c3f22e42d5d786579731613da2a200
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available'
The commit renames the 'power_ctrl_enabled' flag to 'bt_en_available' to avoid
confusion with the new pwrctrl framework. It claims the flag is used to
indicate the availability of the BT_EN GPIO in devicetree.
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index e249fc6e44479..f53f95601693d 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -2402,7 +2402,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
> struct hci_dev *hdev;
> const struct qca_device_data *data;
> int err;
> - bool power_ctrl_enabled = true;
> + bool bt_en_available = true;
[Severity: Medium]
Does initializing this to true imply that BT_EN is available by default, even
when it is not?
[ ... ]
> @@ -2510,7 +2510,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
> (data->soc_type == QCA_WCN6750 ||
> data->soc_type == QCA_WCN6855 ||
> data->soc_type == QCA_WCN7850))
> - power_ctrl_enabled = false;
> + bt_en_available = false;
[Severity: Medium]
For SoCs like QCA_WCN3990, if the BT_EN GPIO is missing but regulators exist,
this variable remains true because the logic to clear it is strictly limited
to WCN6750/WCN6855/WCN7850.
Does this create a semantic mismatch where the variable name suggests BT_EN is
available, but it is actually tracking whether any form of power control is
active?
[ ... ]
> @@ -2566,7 +2566,7 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>
> hdev = qcadev->serdev_hu.hdev;
>
> - if (power_ctrl_enabled) {
> + if (bt_en_available) {
> hci_set_quirk(hdev, HCI_QUIRK_NON_PERSISTENT_SETUP);
> hdev->shutdown = qca_hci_shutdown;
> }
[Severity: Medium]
The qca_hci_shutdown hook is assigned based on this flag to ensure power
control teardown.
Since this flag must remain true for devices like QCA_WCN3990 to execute the
shutdown hook to disable their regulators (even if they lack a BT_EN GPIO),
was the original 'power_ctrl_enabled' name actually more accurate?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005-monza-wireless-v7-0-5a6de7662dcb@oss.qualcomm.com?part=2
next prev parent reply other threads:[~2026-10-05 12:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 12:21 [PATCH v7 0/8] arm64: dts: monaco-arduino-monza: Add support for LGA WiFi/BT module Loic Poulain
2026-10-05 12:21 ` [PATCH v7 1/8] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Loic Poulain
2026-10-05 12:29 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 2/8] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available' Loic Poulain
2026-10-05 12:28 ` sashiko-bot [this message]
2026-10-05 12:21 ` [PATCH v7 3/8] Bluetooth: hci_qca: Set 'bt_en_available' based on pwrseq power controllability Loic Poulain
2026-10-05 12:33 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 4/8] Bluetooth: hci_qca: Embed bt_power in struct qca_serdev Loic Poulain
2026-10-05 12:29 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 5/8] Bluetooth: hci_qca: Support QCA2066 on M.2 connector via pwrseq Loic Poulain
2026-10-05 12:33 ` sashiko-bot
2026-10-07 22:57 ` Val Packett
2026-10-09 16:40 ` Loic Poulain
2026-10-05 12:21 ` [PATCH v7 6/8] Bluetooth: hci_qca: Flatten struct qca_power into struct qca_serdev Loic Poulain
2026-10-05 12:29 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 7/8] dt-bindings: connector: pcie-m2-e: Add vendor LGA connector compatible Loic Poulain
2026-10-05 12:23 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 8/8] arm64: dts: qcom: monaco-arduino-monza: Add QCA2066 M.2 WiFi/BT support Loic Poulain
2026-10-05 12:37 ` 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=20261005122828.A89CD1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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