Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: conor+dt@kernel.org, linux-pci@vger.kernel.org, robh@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v6 01/11] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq
Date: Fri, 04 Sep 2026 16:02:47 +0000	[thread overview]
Message-ID: <20260904160247.7492B1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260904-monza-wireless-v6-1-d8c5042b3efd@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Brittle heuristic for M.2 power sequencer incorrectly assumes any OF graph on the UART controller signifies an M.2 setup, breaking probe on non-M.2 boards.
--

commit af259a50ca6baccd2776acd6a7d13d750b4519f3
Author: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

    Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq
    
This patch adds support for M.2 Bluetooth devices by getting the 'uart'
pwrseq device if an OF graph link is present. This pwrseq device is then used
to control the power supplies of the M.2 card.

> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index faa964735adb1..c8ea5507bdc2c 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c

[ ... ]

> @@ -2448,6 +2449,18 @@ static int qca_serdev_probe(struct serdev_device *serdev)
>  	case QCA_WCN6750:
>  	case QCA_WCN6855:
>  	case QCA_WCN7850:
> +		/*
> +		 * OF graph link is only present for BT devices attached through
> +		 * the M.2 Key E connector.
> +		 */
> +		if (of_graph_is_present(dev_of_node(&serdev->ctrl->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);

[Severity: High]
Does this unconditional error return break probe on non-M.2 boards where the
UART controller has an OF graph for other reasons?

If the UART controller has an OF graph (port or ports nodes) for something
like audio routing or debugger sideband signals, of_graph_is_present() will
return true. The driver then unconditionally attempts to acquire a "uart"
power sequencer.

On non-M.2 boards where this provider does not exist, devm_pwrseq_get() will
return -EPROBE_DEFER. Because this path returns the error immediately, it
aborts probe and skips the legacy "bluetooth" pwrseq and GPIO initialization,
causing the Bluetooth driver to fail to probe on valid, previously supported
device trees.

The serial.yaml DT binding explicitly allows UART controllers to have both a
"bluetooth" child node and port nodes, so this is a valid configuration.

(Note: A devres resource leak in this block was successfully fixed later in
the series, but this logical heuristic issue appears to remain).

> +			break;
> +		}
> +
>  		if (!device_property_present(&serdev->dev, "enable-gpios")) {
>  			/*
>  			 * Backward compatibility with old DT sources. If the

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260904-monza-wireless-v6-0-d8c5042b3efd@oss.qualcomm.com?part=1

  reply	other threads:[~2026-09-04 16:02 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 15:42 [PATCH v6 00/11] arm64: dts: monaco-arduino-monza: Add support for LGA WiFi/BT module Loic Poulain
2026-09-04 15:42 ` [PATCH v6 01/11] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Loic Poulain
2026-09-04 16:02   ` sashiko-bot [this message]
2026-09-04 15:42 ` [PATCH v6 02/11] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available' Loic Poulain
2026-09-04 16:00   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 03/11] power: sequencing: Add pwrseq_is_controllable() API Loic Poulain
2026-09-04 15:52   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 04/11] power: sequencing: pcie-m2: Report power controllability Loic Poulain
2026-09-04 15:48   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 05/11] power: sequencing: qcom-wcn: " Loic Poulain
2026-09-04 15:51   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 06/11] Bluetooth: hci_qca: Set 'bt_en_available' based on pwrseq " Loic Poulain
2026-09-04 15:59   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 07/11] Bluetooth: hci_qca: Embed bt_power in struct qca_serdev Loic Poulain
2026-09-04 15:53   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 08/11] Bluetooth: hci_qca: Support QCA2066 on M.2 connector via pwrseq Loic Poulain
2026-09-04 16:00   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 09/11] Bluetooth: hci_qca: Flatten struct qca_power into struct qca_serdev Loic Poulain
2026-09-04 15:57   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 10/11] dt-bindings: connector: pcie-m2-e: Add vendor LGA connector compatible Loic Poulain
2026-09-04 15:51   ` sashiko-bot
2026-09-04 15:42 ` [PATCH v6 11/11] arm64: dts: qcom: monaco-arduino-monza: Add QCA2066 M.2 WiFi/BT support Loic Poulain
2026-09-04 16:08   ` 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=20260904160247.7492B1F00A3D@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