From: sashiko-bot@kernel.org
To: "Manivannan Sadhasivam via B4 Relay"
<devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 9/9] Bluetooth: hci_qca: Set 'bt_en_available' based on W_DISABLE2# presence in M.2 connector
Date: Fri, 08 May 2026 02:06:36 +0000 [thread overview]
Message-ID: <20260508020636.F0512C2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260507-pwrseq-m2-bt-v2-9-1740bd478539@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Architecture/Layering Violation: Bluetooth driver inspects internal DT properties of the power sequencer provider.
--
commit 30256477703156517ef407c26086261c2d43650f
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Bluetooth: hci_qca: Set 'bt_en_available' based on W_DISABLE2# presence in M.2 connector
This commit checks if the M.2 connector supports the W_DISABLE2# property
by querying the power sequencer provider's device node. If unavailable, it
sets the 'bt_en_available' flag to false, which is used to set the
HCI_QUIRK_NON_PERSISTENT_SETUP quirk.
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
[ ... ]
> @@ -2449,10 +2449,17 @@ static int qca_serdev_probe(struct serdev_device *serdev)
> * the M.2 Key E connector.
> */
> if (of_graph_is_present(dev_of_node(&serdev->ctrl->dev))) {
> + struct device *dev;
> +
> qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->ctrl->dev,
> "uart");
> if (IS_ERR(qcadev->bt_power->pwrseq))
> return PTR_ERR(qcadev->bt_power->pwrseq);
> +
> + dev = pwrseq_to_device(qcadev->bt_power->pwrseq);
> + if (!device_property_present(dev, "w-disable2-gpios"))
> + bt_en_available = false;
Does inspecting the internal properties of the power sequencer provider
break the pwrseq abstraction model?
By extracting the provider's device with pwrseq_to_device() and directly
querying the "w-disable2-gpios" property, the consumer (Bluetooth driver)
becomes tightly coupled to the internal hardware details of the power
sequencer.
Could this cause silent failures on platforms using ACPI, or if a different
power sequencer is used that handles resets without the "w-disable2-gpios"
property?
Would it be more robust if the pwrseq framework exposed a generic capability
query API rather than forcing consumers to parse the provider's device
properties?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260507-pwrseq-m2-bt-v2-0-1740bd478539@oss.qualcomm.com?part=9
next prev parent reply other threads:[~2026-05-08 2:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 16:06 [PATCH v2 0/9] Fixes/improvements for the PCI M.2 power sequencing driver Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 1/9] power: sequencing: pcie-m2: Fix inconsistent function prefixes Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 2/9] power: sequencing: pcie-m2: Allow creating serdev for multiple PCI devices Manivannan Sadhasivam via B4 Relay
2026-05-07 23:28 ` sashiko-bot
2026-05-07 16:06 ` [PATCH v2 3/9] power: sequencing: pcie-m2: Improve PCI device ID check Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 4/9] power: sequencing: pcie-m2: Create serdev for PCI devices present before probe Manivannan Sadhasivam via B4 Relay
2026-05-07 23:54 ` sashiko-bot
2026-05-07 16:06 ` [PATCH v2 5/9] power: sequencing: pcie-m2: Create BT node based on the pci_device_id[] table Manivannan Sadhasivam via B4 Relay
2026-05-07 16:06 ` [PATCH v2 6/9] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Manivannan Sadhasivam via B4 Relay
2026-05-08 0:44 ` sashiko-bot
2026-05-07 16:06 ` [PATCH v2 7/9] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available' Manivannan Sadhasivam via B4 Relay
2026-05-08 0:53 ` sashiko-bot
2026-05-11 11:34 ` Bartosz Golaszewski
2026-05-07 16:06 ` [PATCH v2 8/9] power: sequencing: Add an API to return the pwrseq device's 'dev' pointer Manivannan Sadhasivam via B4 Relay
2026-05-08 1:16 ` sashiko-bot
2026-05-11 11:34 ` Bartosz Golaszewski
2026-05-07 16:06 ` [PATCH v2 9/9] Bluetooth: hci_qca: Set 'bt_en_available' based on W_DISABLE2# presence in M.2 connector Manivannan Sadhasivam via B4 Relay
2026-05-08 2:06 ` sashiko-bot [this message]
2026-05-11 11:36 ` Bartosz Golaszewski
2026-05-08 12:49 ` [PATCH v2 0/9] Fixes/improvements for the PCI M.2 power sequencing driver Wei Deng
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=20260508020636.F0512C2BCB2@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=devnull+manivannan.sadhasivam.oss.qualcomm.com@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko@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