Skip to content

Improvements to the PCIe M.2 power sequencing driver#1262

Open
WeiDeng-weiden wants to merge 9 commits into
qualcomm-linux:tech/bus/pci/allfrom
WeiDeng-weiden:tech/bus/pci/all
Open

Improvements to the PCIe M.2 power sequencing driver#1262
WeiDeng-weiden wants to merge 9 commits into
qualcomm-linux:tech/bus/pci/allfrom
WeiDeng-weiden:tech/bus/pci/all

Conversation

@WeiDeng-weiden
Copy link
Copy Markdown

@WeiDeng-weiden WeiDeng-weiden commented May 28, 2026

This series has several improvements to the M.2 power sequencing driver, notably allowing the driver to work with more M.2 cards (not just WCN7850), and creates serdev devices for PCI devices present before the driver probe.
It also adds M.2 Bluetooth device support in hci_qca via pwrseq.

The Bluetooth patches (7-9) are included in this branch because they depend on the pwrseq_to_device() API introduced in patch 6. Merging both through the same tree avoids the cross-branch dependency issue described in the upstream cover letter:
https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com

CRs-Fixed: 4552421

@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Component Found

Configuration Error: No component found for branch 'tech/bus/pci/all'.

There is no component associated with the provided branch in Polaris. Please verify the branch configuration.

Branch: tech/bus/pci/all

@qcomlnxci qcomlnxci requested review from a team, krishnachaitanya-linux and meleung and removed request for a team May 28, 2026 05:20
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Component Found

Configuration Error: No component found for branch 'tech/bus/pci/all'.

There is no component associated with the provided branch in Polaris. Please verify the branch configuration.

Branch: tech/bus/pci/all

@qlijarvis
Copy link
Copy Markdown

PR #1262 — validate-patch

PR: #1262

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 6 commits link to https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com
  2. Lore link matches PR commits: Cannot verify — network access to lore.kernel.org is restricted; manual verification required
  3. Upstream patch status: Cannot verify — network access restricted; check lore thread manually for acceptance/NAK signals
  4. PR present in qcom-next: No — none of the 6 commits are in qcom-next yet (verified by checking function names and API presence)
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1262
Upstream commit: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com
Verdict: ⚠️ PARTIAL (network restrictions prevented full lore verification)

Summary

This PR contains 6 commits from a patch series (v3) posted to the mailing list. All commits are properly tagged with FROMLIST: prefix and include the same lore.kernel.org link. The commits follow proper kernel development practices with appropriate sign-offs and test tags.

Key findings:

  • ✅ All 6 commits have valid lore.kernel.org links
  • ✅ Commit messages are well-structured with clear descriptions
  • ✅ Authorship and sign-offs are correct for FROMLIST commits
  • ✅ Co-developed-by usage in commit 5 is appropriate
  • ⚠️ Cannot verify diff faithfulness to lore (network access restricted)
  • ⚠️ Cannot verify upstream acceptance status (network access restricted)
  • ⚠️ Commits NOT yet present in qcom-next branch

Commit Message Analysis

Commit Subject Status Notes
1/6 Fix inconsistent function prefixes ✅ PASS Clear, focused change
2/6 Allow creating serdev for multiple PCI devices ✅ PASS Well-described refactoring
3/6 Improve PCI device ID check ✅ PASS Has Reviewed-by tag
4/6 Create serdev for PCI devices present before probe ✅ PASS Explains race condition handling
5/6 Create BT node based on pci_device_id[] table ✅ PASS Proper Co-developed-by usage
6/6 Add an API to return pwrseq device's 'dev' pointer ✅ PASS New API addition

Authorship & Sign-offs

Commit Author Sign-off Chain Status
1/6 Manivannan Sadhasivam Manivannan → Tested-by: Wei ✅ PASS
2/6 Manivannan Sadhasivam Manivannan → Tested-by: Wei ✅ PASS
3/6 Manivannan Sadhasivam Manivannan → Reviewed-by: Konrad → Tested-by: Wei ✅ PASS
4/6 Manivannan Sadhasivam Manivannan → Tested-by: Wei ✅ PASS
5/6 Manivannan Sadhasivam Co-developed-by: Wei → Manivannan → Wei ✅ PASS
6/6 Manivannan Sadhasivam Manivannan → Tested-by: Wei ✅ PASS

Note on FROMLIST authorship: For FROMLIST: commits, the submitter (who adds the prefix) may differ from the lore author. The original author's Signed-off-by: must be present. In this case, all commits have Manivannan as both author and primary sign-off, which is correct.

Diff Analysis

Files modified:

  • drivers/power/sequencing/pwrseq-pcie-m2.c (commits 1-5)
  • drivers/power/sequencing/core.c (commit 6)
  • include/linux/pwrseq/consumer.h (commit 6)

Change summary:

Commit Type Complexity Notes
1/6 Refactor Low Function name consistency fix (4 renames)
2/6 Feature High Multi-device support with list management
3/6 Refactor Low Replace hardcoded checks with pci_match_id()
4/6 Feature Medium Handle devices present before probe
5/6 Feature Medium Dynamic BT node creation from table
6/6 Feature Low New API: pwrseq_to_device()

Logical progression: The series follows a clear refactoring → feature addition pattern:

  1. Fix naming inconsistency (cleanup)
  2. Add infrastructure for multiple devices
  3. Improve device matching
  4. Handle pre-existing devices
  5. Make BT node creation dynamic
  6. Add helper API for consumers

Upstream Patch Status

⚠️ Cannot verify — Network access to lore.kernel.org is restricted in this environment.

What should be checked manually:

  • Whether the v3 series has been accepted/merged upstream
  • Whether there are any NAK or rejection signals
  • Whether a v4 or later revision exists
  • Current review status and maintainer feedback

Lore link for manual verification:
https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com

qcom-next Presence

Commit Status
1/6: Fix inconsistent function prefixes ⚠️ Not in qcom-next
2/6: Allow creating serdev for multiple PCI devices ⚠️ Not in qcom-next
3/6: Improve PCI device ID check ⚠️ Not in qcom-next
4/6: Create serdev for PCI devices present before probe ⚠️ Not in qcom-next
5/6: Create BT node based on pci_device_id[] table ⚠️ Not in qcom-next
6/6: Add an API to return pwrseq device's 'dev' pointer ⚠️ Not in qcom-next

Evidence: Checked /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel (qcom-next branch). The old function names (pwrseq_m2_pcie_create_bt_node, pwrseq_m2_pcie_notify) are still present at lines 180 and 302 of pwrseq-pcie-m2.c, confirming commit 1 has not landed. The pwrseq_to_device() function is not present in core.c, confirming commit 6 has not landed.

Issues Found

None identified in commit message structure or authorship. However:

  1. Network verification incomplete — Cannot verify:

    • Exact diff match against lore patch
    • Upstream acceptance status
    • Whether this is the latest revision
  2. Not in qcom-next — These commits have not yet landed in the Qualcomm kernel tree. This is expected for FROMLIST commits that are still under review.

Verdict

⚠️ PARTIAL — Commit messages and authorship are correct, but full validation requires:

  1. Manual lore verification — Check the lore link to confirm:

    • Diff content matches exactly
    • No semantic changes were introduced
    • Current upstream status (accepted/pending/rejected)
    • Whether v4 or later exists
  2. Wait for upstream acceptance — Since these are FROMLIST: commits, they should ideally be accepted upstream before merging into the vendor tree, unless there's a specific reason to carry them early.

Recommendation

Option 1 (Recommended): Wait for upstream acceptance, then update prefix to UPSTREAM: or BACKPORT: as appropriate.

Option 2: If there's urgency to merge before upstream acceptance:

  • Verify manually that the lore link content matches the PR exactly
  • Monitor the lore thread for acceptance/rejection signals
  • Be prepared to update if upstream requests changes

Final Summary

  1. Lore link present: Yes — all 6 commits link to https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com
  2. Lore link matches PR commits: Cannot verify — network access to lore.kernel.org is restricted; manual verification required
  3. Upstream patch status: Cannot verify — network access restricted; check lore thread manually for acceptance/NAK signals
  4. PR present in qcom-next: No — none of the 6 commits are in qcom-next yet (verified by checking function names and API presence)

@qlijarvis
Copy link
Copy Markdown

PR #1262 — checker-log-analyzer

PR: #1262
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26556323555

Checker Result Summary
Checker Result Summary
checkpatch 5 commits with style issues (2 WARNINGs, 4 CHECKs)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance 7 commits with link/content issues
tag-check All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1262 - power: sequencing: pcie-m2 improvements and PCI/pwrctrl fixes
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26556323555
Target Branch: topic/tech/bus/pci/all

Checker Result Summary
checkpatch 5 commits with style issues (2 WARNINGs, 4 CHECKs)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No devicetree changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance 7 commits with link/content issues
tag-check All commits have valid FROMLIST: prefix

❌ checkpatch

Root cause: Multiple commits have coding style issues ranging from missing documentation to alignment problems.

Failure details:

Commit acd6cd0 ("FROMLIST: PCI/pwrctrl: Do not try to power on/off devices that don't need pwrctrl"):

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#19: 
Reported-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Commit 4d988ab ("FROMLIST: power: sequencing: pcie-m2: Fix inconsistent function prefixes"):

CHECK: Alignment should match open parenthesis
#27: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:181:
+static int pwrseq_pcie_m2_create_bt_node(struct pwrseq_pcie_m2_ctx *ctx,
 					struct device_node *parent)

CHECK: Alignment should match open parenthesis
#45: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:303:
+static int pwrseq_pcie_m2_notify(struct notifier_block *nb, unsigned long action,
 			      void *data)

Commit 3ea1d71 ("FROMLIST: power: sequencing: pcie-m2: Allow creating serdev for multiple PCI devices"):

CHECK: struct mutex definition without comment
#56: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:45:
+	struct mutex list_lock;

Commit 8a2ad70 ("FROMLIST: power: sequencing: pcie-m2: Create serdev for PCI devices present before probe"):

CHECK: Alignment should match open parenthesis
#38: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:240:
+static int pwrseq_pcie_m2_create_serdev_one(struct pwrseq_pcie_m2_ctx *ctx,
 					struct pci_dev *pdev)

Commit 7ceff1f ("FROMLIST: power: sequencing: pcie-m2: Create BT node based on the pci_device_id[] table"):

WARNING: Co-developed-by: must be immediately followed by Signed-off-by:
#12: 
Co-developed-by: Wei Deng <wei.deng@oss.qualcomm.com>
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>

Fix:

  1. For acd6cd0: Add a Closes: tag immediately after Reported-by: with a URL to the bug report or discussion thread.

  2. For alignment issues (4d988ab, 8a2ad70): Fix function parameter alignment to match the opening parenthesis:

    git rebase -i <base_sha>  # mark commits as 'edit'
    # Fix alignment in the affected files
    git commit --amend --no-edit
    git rebase --continue
  3. For 3ea1d71: Add a comment above the mutex explaining its purpose:

    /* Protects the pci_devices list */
    struct mutex list_lock;
  4. For 7ceff1f: Add Wei Deng's Signed-off-by: immediately after the Co-developed-by: tag:

    Co-developed-by: Wei Deng <wei.deng@oss.qualcomm.com>
    Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com>
    Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
    

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git df3ae9703774b70a7b7758b53498a25de9f87174..0bae60d6ee80fc204b4e3d8fcf9e334a0477675a

❌ check-patch-compliance

Root cause: Six commits use a cover letter URL instead of individual patch message IDs, and one commit has content differences from upstream.

Failure details:

Commit b1c88d1 ("FROMLIST: PCI: qcom: Set max OPP before DBI access during resume"):

Change is different from the one mentioned in Link

Commits 4d988ab, 3ea1d71, 23e6ee4, 8a2ad70, 7ceff1f, f6904fe:

Something seems wrong with the provided link. Please verify it
Try below command to run locally-
b4 am --single-message -C -l -3 https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com

The Link URL https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com is a cover letter (note the -0- in the message ID), not an individual patch. The checker expects each commit to link to its specific patch message.

Fix:

  1. For b1c88d1: Fetch the upstream patch and compare the diff to identify what changed:

    b4 am --single-message -C -l -3 <correct-link> -o /tmp/out
    git format-patch -1 b1c88d10cb51 --stdout > /tmp/pr.patch
    # Compare the patches to identify differences

    Either revert the unintended changes or document them in the commit message if they are legitimate adaptations.

  2. For the six commits with cover letter URLs: Replace the cover letter Link with individual patch message IDs. The correct format should be:

    • Patch 1/6: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-1-b39dc2ae3966@oss.qualcomm.com
    • Patch 2/6: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-2-b39dc2ae3966@oss.qualcomm.com
    • Patch 3/6: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-3-b39dc2ae3966@oss.qualcomm.com
    • Patch 4/6: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-4-b39dc2ae3966@oss.qualcomm.com
    • Patch 5/6: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-5-b39dc2ae3966@oss.qualcomm.com
    • Patch 6/6: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-6-b39dc2ae3966@oss.qualcomm.com

    Update each commit's Link tag:

    git rebase -i <base_sha>  # mark each commit as 'edit'
    # For each commit, amend the Link: tag
    git commit --amend  # edit the commit message
    git rebase --continue

Reproduce locally:

# For each commit:
b4 am --single-message -C -l -3 <individual-patch-link>

Verdict

8 blockers must be fixed before merge:

  1. checkpatch (5 issues):

    • Add Closes: tag after Reported-by: in commit acd6cd0
    • Fix function parameter alignment in commits 4d988ab and 8a2ad70
    • Add mutex comment in commit 3ea1d71
    • Add Signed-off-by: after Co-developed-by: in commit 7ceff1f
  2. check-patch-compliance (7 issues):

The most critical issue is the Link: tag problem — using cover letter URLs instead of individual patch URLs breaks the compliance checker's ability to verify patch content. This must be fixed for all six affected commits.

@qcomlnxci qcomlnxci requested a review from a team May 28, 2026 06:52
@qlijarvis
Copy link
Copy Markdown

PR #1262 — validate-patch

PR: #1262

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 6 commits have proper Link: tags pointing to the v3 series on lore.kernel.org
  2. Lore link matches PR commits: Cannot verify — network restrictions prevented fetching lore patches for diff comparison
  3. Upstream patch status: ⏳ Decision Pending (unknown) — network restrictions prevented verification; series is dated 2026-05-19 (v3), suggesting active development
  4. PR present in qcom-next: No — none of the 6 commits found in qcom-next branch (checked up to d60bc14)
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1262
Upstream commits: 6 patches from lore.kernel.org (v3 series: 20260519-pwrseq-m2-bt-v3-*-b39dc2ae3966@oss.qualcomm.com)
Verdict: ⚠️ PARTIAL

Summary

This PR contains 6 FROMLIST: commits from a v3 patch series posted to lore.kernel.org on 2026-05-19. All commits have proper lore links and consistent authorship. However, one commit has an incomplete Co-developed-by tag, and upstream status could not be verified due to network restrictions.

Commit Message Analysis

Commit Subject Status Notes
1/6 Fix inconsistent function prefixes Clean commit message, proper tags
2/6 Allow creating serdev for multiple PCI devices Clean commit message, proper tags
3/6 Improve PCI device ID check Has Reviewed-by: from Konrad Dybcio
4/6 Create serdev for PCI devices present before probe Clean commit message, proper tags
5/6 Create BT node based on the pci_device_id[] table Missing Signed-off-by: for co-developer
6/6 Add an API to return the pwrseq device's 'dev' pointer Clean commit message, proper tags

Authorship Check (FROMLIST commits):

  • ✅ All commits have From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
  • ✅ All commits have Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
  • ✅ For FROMLIST: prefix, the submitter is legitimately in From: field
  • ✅ All commits have Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
  • ✅ Commit 3/6 has Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Other Checks:

  • ✅ All 6 commits have proper Link: tags pointing to lore.kernel.org
  • ✅ No Fixes: tags (not applicable for new feature series)
  • ✅ Commit subjects match the FROMLIST: prefix pattern
  • ✅ Commit messages preserve rationale and technical details

Diff Analysis

All commits modify drivers/power/sequencing/pwrseq-pcie-m2.c except commit 6/6 which also touches:

  • drivers/power/sequencing/core.c
  • include/linux/pwrseq/consumer.h

Changes appear to be:

  • Commits 1-5: Refactoring and feature additions to the PCIe M.2 power sequencing driver
  • Commit 6: Adding a new API function pwrseq_to_device()

Without access to lore.kernel.org, I cannot verify the exact diff correspondence, but the commit structure and progression appear logical and well-organized.

Issues Found

❌ Commit 5/6: Incomplete Co-developed-by tag

Co-developed-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Problem: According to kernel documentation (Documentation/process/submitting-patches.rst), every Co-developed-by: tag must be immediately followed by a Signed-off-by: from that same person. The commit is missing:

Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com>

Impact: This will likely trigger a checkpatch warning and may be flagged during upstream review.

Fix: Add Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com> immediately after the Co-developed-by: line in commit 5/6.

Upstream Patch Status

Decision Pending (unknown — network restrictions prevented verification)

  • Cannot fetch lore.kernel.org threads due to network access restrictions
  • Cannot verify if patches have been ACKed, NACKed, or are still under review
  • Cannot check if patches have been merged into maintainer trees or mainline
  • The series is dated 2026-05-19 (v3 revision), suggesting active development

Recommendation: Manually verify the upstream status by visiting:

qcom-next Presence

Commit Status
1/6: Fix inconsistent function prefixes ⚠️ Not in qcom-next
2/6: Allow creating serdev for multiple PCI devices ⚠️ Not in qcom-next
3/6: Improve PCI device ID check ⚠️ Not in qcom-next
4/6: Create serdev for PCI devices present before probe ⚠️ Not in qcom-next
5/6: Create BT node based on the pci_device_id[] table ⚠️ Not in qcom-next
6/6: Add an API to return the pwrseq device's 'dev' pointer ⚠️ Not in qcom-next

Note: Searched qcom-next branch at /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel (commit d60bc14). None of the 6 commits from this series are present yet. The most recent commits in drivers/power/sequencing/pwrseq-pcie-m2.c are from earlier work.

Dependency Check

All dependencies appear to be satisfied

The patch series is structured as a logical progression:

  1. Fix function naming (cleanup)
  2. Refactor to support multiple PCI devices (infrastructure)
  3. Improve PCI device ID checking (infrastructure)
  4. Create serdev for existing devices (feature)
  5. Make BT node creation table-driven (refactor)
  6. Add new API for consumers (feature)

Each commit builds on the previous ones in a clean, reviewable manner.

Verdict

⚠️ PARTIAL — Fix Co-developed-by tag in commit 5/6 before merging

What needs fixing:

  1. Commit 5/6: Add Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com> after the Co-developed-by: line

What to verify manually (due to network restrictions):

  1. Check lore.kernel.org for upstream acceptance status
  2. Verify that the diff content matches the lore patches exactly
  3. Confirm no newer revisions (v4, v5, etc.) have been posted

Recommendation: Fix the Co-developed-by issue in commit 5/6, then verify upstream status before merging. The series appears well-structured and properly attributed otherwise.

Final Summary

  1. Lore link present: Yes — all 6 commits have proper Link: tags pointing to the v3 series on lore.kernel.org
  2. Lore link matches PR commits: Cannot verify — network restrictions prevented fetching lore patches for diff comparison
  3. Upstream patch status: ⏳ Decision Pending (unknown) — network restrictions prevented verification; series is dated 2026-05-19 (v3), suggesting active development
  4. PR present in qcom-next: No — none of the 6 commits found in qcom-next branch (checked up to d60bc14)

@qlijarvis
Copy link
Copy Markdown

PR #1262 — checker-log-analyzer

PR: #1262
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26560079022

Checker Result Summary
Checker Result Summary
checkpatch 5 commits with style issues (alignment, mutex comment, Co-developed-by, Reported-by)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers No UAPI changes
check-patch-compliance 1 commit with content mismatch
tag-check All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1262 - Power sequencing and PCI pwrctrl improvements
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26560079022

Checker Result Summary
checkpatch 5 commits with style issues (alignment, mutex comment, Co-developed-by, Reported-by)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers No UAPI changes
check-patch-compliance 1 commit with content mismatch
tag-check All commits have valid FROMLIST: prefix

❌ checkpatch

Root cause: Multiple style issues across 5 commits including alignment problems, missing mutex comment, Co-developed-by mismatch, and missing Closes: tag after Reported-by.

Failure details:

Commit acd6cd0 ("FROMLIST: PCI/pwrctrl: Do not try to power on/off devices that don't need pwrctrl"):

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#19: 
Reported-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Commit e64dec3 ("FROMLIST: power: sequencing: pcie-m2: Fix inconsistent function prefixes"):

CHECK: Alignment should match open parenthesis
#27: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:181:
+static int pwrseq_pcie_m2_create_bt_node(struct pwrseq_pcie_m2_ctx *ctx,
 					struct device_node *parent)

CHECK: Alignment should match open parenthesis
#45: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:303:
+static int pwrseq_pcie_m2_notify(struct notifier_block *nb, unsigned long action,
 			      void *data)

Commit 64e46a5 ("FROMLIST: power: sequencing: pcie-m2: Allow creating serdev for multiple PCI devices"):

CHECK: struct mutex definition without comment
#56: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:45:
+	struct mutex list_lock;

Commit 7276076 ("FROMLIST: power: sequencing: pcie-m2: Create serdev for PCI devices present before probe"):

CHECK: Alignment should match open parenthesis
#38: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:240:
+static int pwrseq_pcie_m2_create_serdev_one(struct pwrseq_pcie_m2_ctx *ctx,
 					struct pci_dev *pdev)

Commit f5bcc8f ("FROMLIST: power: sequencing: pcie-m2: Create BT node based on the pci_device_id[] table"):

WARNING: Co-developed-by and Signed-off-by: name/email do not match
#13: 
Co-developed-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Fix:

  1. For Reported-by warning (commit acd6cd0): Add Closes: tag with bug report URL immediately after Reported-by::

    git rebase -i <base_sha>  # mark commit as 'edit'
    # Edit commit message to add:
    # Reported-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
    # Closes: <URL-to-bug-report>
    git commit --amend
    git rebase --continue
  2. For alignment issues (commits e64dec3, 7276076): Fix function parameter alignment in drivers/power/sequencing/pwrseq-pcie-m2.c:

    git rebase -i <base_sha>  # mark commits as 'edit'
    # Align continuation lines with opening parenthesis
    git add drivers/power/sequencing/pwrseq-pcie-m2.c
    git commit --amend --no-edit
    git rebase --continue
  3. For mutex comment (commit 64e46a5): Add comment above struct mutex list_lock;:

    /* Protects pci_devices list */
    struct mutex list_lock;
  4. For Co-developed-by (commit f5bcc8f): Add Signed-off-by: for Wei Deng after the Co-developed-by: line:

    Co-developed-by: Wei Deng <wei.deng@oss.qualcomm.com>
    Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com>
    Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
    

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git df3ae9703774b70a7b7758b53498a25de9f87174..3966b6e3522e7b07b8133207b259874604f8439c

❌ check-patch-compliance

Root cause: Commit b1c88d1 has content differences from the upstream lore patch.

Failure details:

Checking commit: FROMLIST: PCI: qcom: Set max OPP before DBI access during resume
Change is different from the one mentioned in Link

Fix:

  1. Fetch the upstream patch and compare:

    b4 am --single-message -C -l -3 <lore-link-from-commit-message> -o /tmp/out
    git format-patch -1 b1c88d10cb51 --stdout > /tmp/pr-patch.txt
    # Compare the diff sections
    diff <(awk '/^diff/,/^--$/' /tmp/pr-patch.txt | grep -E '^[+-][^+-]') \
         <(awk '/^diff/,/^--$/' /tmp/out/*.mbx | grep -E '^[+-][^+-]')
  2. Determine if the difference is:

    • Context-only shift: Not a real issue, can be ignored
    • Legitimate adaptation: Document the reason in commit message
    • Missing/extra hunk: Sync with upstream or attribute separately
  3. If the patch needs to match upstream exactly, cherry-pick from the lore link or rebase to align with upstream version.

Reproduce locally:

cd /path/to/kernel
git log --oneline df3ae9703774b70a7b7758b53498a25de9f87174..HEAD
# For each FROMLIST commit, run:
b4 am --single-message -C -l -3 <Link-URL-from-commit-message>

Verdict

2 blockers must be fixed before merge:

  1. checkpatch: Fix 5 commits with style issues (1 WARNING for Reported-by/Closes, 1 WARNING for Co-developed-by, 3 CHECKs for alignment and mutex comment)
  2. check-patch-compliance: Resolve content mismatch in commit b1c88d1 - verify if differences are intentional adaptations or need to be synced with upstream

The CHECKs are style suggestions and may be acceptable as-is depending on project policy, but the WARNINGs should be addressed. The content mismatch in check-patch-compliance is the primary blocker requiring investigation.

All functions in this driver follow 'pwrseq_pcie_m2' prefix except a few.
Fix them to avoid inconsistency.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-1-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
…ple PCI devices

Current code makes it possible to create serdev for only one PCI device.
But for scaling this driver, it is necessary to allow creating serdev for
multiple PCI devices.

Hence, add provision for it by creating 'struct pwrseq_pci_dev' for each
PCI device that requires serdev and add them to
'pwrseq_pcie_m2_ctx::pci_devices' list.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-2-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Instead of hardcoding the PCI device check, use pci_match_id() to check for
the known IDs using the pwrseq_m2_pci_ids[] array.

This makes adding support for new devices easier.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-3-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
…resent before probe

So far, the driver is registering a notifier to create serdev for the PCI
devices that are going to be attached after probe. But it doesn't handle
the devices present before probe. Due to this, serdev is not getting
created for those existing devices.

Hence, create serdev for PCI devices available before probe as well.

Note that the serdev for available devices are created before
registering the notifier. There is a small window where a device could
appear after pwrseq_pcie_m2_create_serdev(), before notifier registration.
But since M.2 cards are fixed to a slot, they are mostly added either
before booting the host or after using hotplug. So this window is mostly
theoretical.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-4-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
…_device_id[] table

Currently, pwrseq_pcie_m2_create_bt_node() hardcodes the BT compatible for
creating the devicetree node. But to allow adding support for more devices
in the future, create the BT node based on the pci_device_id[] table. The
BT compatible is passed using 'driver_data'.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-5-b39dc2ae3966@oss.qualcomm.com
Co-developed-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Wei Deng <wei.deng@oss.qualcomm.com>
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
… 'dev' pointer

The consumer drivers can make use of the pwrseq device's 'dev' pointer to
query the pwrseq provider's DT node to check for existence of specific
properties.

Hence, add an API to return the pwrseq device's 'dev' pointer to consumers.

Note that since pwrseq_get() would've increased the pwrseq refcount, there
is no need to increase the refcount in this API again.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-6-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
…pwrseq

Power supply to the M.2 Bluetooth device attached to the host using M.2
connector is controlled using the 'uart' pwrseq device. So add support for
getting the pwrseq device if the OF graph link is present. Once obtained,
the existing pwrseq APIs can be used to control the power supplies of the
M.2 card.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-7-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
…vailable'

'power_ctrl_enabled' flag is used to indicate the availability of the BT_EN
GPIO in devicetree. But the naming causes confusion with the new pwrctrl
framework.

So rename it to 'bt_en_available' to make it clear and explicit.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-8-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
…E2# presence in M.2 connector

Check if the M.2 connector supports the W_DISABLE2# property or not by
querying the pwrseq provider's DT node. If not available, then set
'bt_en_available' flag to 'false'. This flag is used to set the
HCI_QUIRK_NON_PERSISTENT_SETUP HCI quirk, which informs the HCI layer
whether the shutdown() callback for the device can be triggered or not.

Link: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-9-b39dc2ae3966@oss.qualcomm.com
Tested-by: Wei Deng <wei.deng@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
@qswat-orbit-external
Copy link
Copy Markdown

Merge Check Failed: No Component Found

Configuration Error: No component found for branch 'tech/bus/pci/all'.

There is no component associated with the provided branch in Polaris. Please verify the branch configuration.

Branch: tech/bus/pci/all

@qlijarvis
Copy link
Copy Markdown

PR #1262 — validate-patch

PR: #1262

Verdict Issues Detailed Report
⚠️ 0 Full report

Final Summary

  1. Lore link present: Yes — all 9 commits have proper Link: tags pointing to v3 series on lore.kernel.org
  2. Lore link matches PR commits: Cannot verify — network restrictions prevent fetching lore patches for comparison
  3. Upstream patch status: ⏳ Decision Pending — v3 series posted May 19, 2026; has review tags from multiple maintainers (Konrad Dybcio, Bartosz Golaszewski, Dmitry Baryshkov); likely under active review; cannot check for acceptance or newer revisions due to network restrictions
  4. PR present in qcom-next: No — searched qcom-next branch at /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel; none of the 9 commits found in history of drivers/power/sequencing/pwrseq-pcie-m2.c or drivers/bluetooth/hci_qca.c

Recommendation: Structural validation passes. Before merging:

  1. Verify diff content matches lore v3 patches (requires network access)
  2. Check lore for any v4 or later revisions
  3. Confirm no NAK or rejection signals in thread replies
  4. Consider waiting for upstream acceptance before merging to vendor tree
Verdict: ⚠️ — click to expand

🔍 Patch Validation

PR: #1262 (9 commits: power sequencing and Bluetooth M.2 support)
Upstream commit: https://lore.kernel.org/r/20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com (v3 series)
Verdict: ⚠️ PARTIAL (structural validation only - network restrictions prevent full lore comparison)

Commit Message

Check Status Note
Subject matches upstream ⚠️ Cannot verify - network restricted; lore.kernel.org unreachable
Body preserves rationale All commits have clear, concise rationale explaining the change
Fixes tag present/correct N/A No Fixes tags; appropriate for new feature series
Authorship preserved FROMLIST: commits correctly use submitter in From:; original author SoB present where applicable
Backport note (if applicable) N/A FROMLIST commits - not backports
Co-developed-by used correctly Commit 5/9 correctly uses Co-developed-by for Wei Deng with proper SoB chain

Diff

File Status Notes
drivers/power/sequencing/pwrseq-pcie-m2.c ⚠️ Cannot verify against lore - network restricted
drivers/power/sequencing/core.c ⚠️ Cannot verify against lore - network restricted
include/linux/pwrseq/consumer.h ⚠️ Cannot verify against lore - network restricted
drivers/bluetooth/hci_qca.c ⚠️ Cannot verify against lore - network restricted

Structural Analysis

Positive indicators:

  • All 9 commits have proper lore.kernel.org links in Link: tags
  • All use FROMLIST: prefix (correct for patches posted but not yet merged)
  • Authorship follows FROMLIST rules: submitter (Manivannan) in From:, original author SoB preserved
  • Proper review tags: Tested-by: Wei Deng on all commits; Reviewed-by: from Konrad Dybcio, Bartosz Golaszewski, Dmitry Baryshkov on relevant commits
  • Commit 5/9 correctly uses Co-developed-by: for genuine co-authorship (Wei Deng)
  • Message-IDs follow consistent pattern: 20260519-pwrseq-m2-bt-v3-{1..9}-b39dc2ae3966@oss.qualcomm.com
  • Series is v3 revision, indicating upstream review iteration

Concerns:

  • Date stamps show May 19, 2026 (future date) - likely test/staging environment artifact
  • Cannot verify diff content matches lore patches due to network restrictions
  • Cannot check for newer revisions (v4, v5) on lore

Verdict

Structural validation: PASS - All commit message hygiene, authorship, and tagging conventions are correct for FROMLIST commits.

Content validation: INCOMPLETE - Cannot verify diff faithfulness to lore patches due to environment restrictions (read-only filesystem, no network access). Manual verification recommended:

  1. Fetch patches: b4 am 20260519-pwrseq-m2-bt-v3-0-b39dc2ae3966@oss.qualcomm.com
  2. Compare each commit's diff against the corresponding lore patch
  3. Check for any v4 or later revisions on lore

Final Summary

  1. Lore link present: Yes — all 9 commits have proper Link: tags pointing to v3 series on lore.kernel.org
  2. Lore link matches PR commits: Cannot verify — network restrictions prevent fetching lore patches for comparison
  3. Upstream patch status: ⏳ Decision Pending — v3 series posted May 19, 2026; has review tags from multiple maintainers (Konrad Dybcio, Bartosz Golaszewski, Dmitry Baryshkov); likely under active review; cannot check for acceptance or newer revisions due to network restrictions
  4. PR present in qcom-next: No — searched qcom-next branch at /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel; none of the 9 commits found in history of drivers/power/sequencing/pwrseq-pcie-m2.c or drivers/bluetooth/hci_qca.c

Recommendation: Structural validation passes. Before merging:

  1. Verify diff content matches lore v3 patches (requires network access)
  2. Check lore for any v4 or later revisions
  3. Confirm no NAK or rejection signals in thread replies
  4. Consider waiting for upstream acceptance before merging to vendor tree

@qlijarvis
Copy link
Copy Markdown

PR #1262 — checker-log-analyzer

PR: #1262
Checker run: https://github.com/qualcomm-linux/kernel-config/actions/runs/26563486421

Checker Result Summary
Checker Result Summary
checkpatch 4 commits with style issues (1 WARNING, 4 CHECK)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance 1 commit with content mismatch
tag-check All commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1262 - M.2 Bluetooth device support using pwrseq
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/26563486421

Checker Result Summary
checkpatch 4 commits with style issues (1 WARNING, 4 CHECK)
dt-binding-check ⏭️ No DT binding changes
dtb-check ⏭️ No DTS changes
sparse-check Passed
check-uapi-headers Passed
check-patch-compliance 1 commit with content mismatch
tag-check All commits have valid FROMLIST: prefix

❌ checkpatch

Root cause: Multiple commits have minor style issues (alignment and missing comment).

Failure details:

Commit acd6cd0 ("FROMLIST: PCI/pwrctrl: Do not try to power on/off devices that don't need pwrctrl"):

WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#19: 
Reported-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>

Commit 1919893 ("FROMLIST: power: sequencing: pcie-m2: Fix inconsistent function prefixes"):

CHECK: Alignment should match open parenthesis
#27: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:181:
+static int pwrseq_pcie_m2_create_bt_node(struct pwrseq_pcie_m2_ctx *ctx,
 					struct device_node *parent)

CHECK: Alignment should match open parenthesis
#45: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:303:
+static int pwrseq_pcie_m2_notify(struct notifier_block *nb, unsigned long action,
 			      void *data)

Commit 36dea8a ("FROMLIST: power: sequencing: pcie-m2: Allow creating serdev for multiple PCI devices"):

CHECK: struct mutex definition without comment
#56: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:45:
+	struct mutex list_lock;

Commit d600e58 ("FROMLIST: power: sequencing: pcie-m2: Create serdev for PCI devices present before probe"):

CHECK: Alignment should match open parenthesis
#38: FILE: drivers/power/sequencing/pwrseq-pcie-m2.c:240:
+static int pwrseq_pcie_m2_create_serdev_one(struct pwrseq_pcie_m2_ctx *ctx,
 					struct pci_dev *pdev)

Fix:

  1. For commit acd6cd0 — Add Closes: tag after Reported-by::

    git rebase -i <base_sha>   # mark commit as 'edit'
    # Edit commit message to add:
    # Reported-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
    # Closes: <URL to the bug report or discussion>
    git commit --amend
    git rebase --continue
  2. For alignment issues (commits 1919893, d600e58) — Align continuation lines with opening parenthesis:

    // Before:
    static int pwrseq_pcie_m2_create_bt_node(struct pwrseq_pcie_m2_ctx *ctx,
                                             struct device_node *parent)
    
    // After:
    static int pwrseq_pcie_m2_create_bt_node(struct pwrseq_pcie_m2_ctx *ctx,
                                              struct device_node *parent)
  3. For mutex comment (commit 36dea8a) — Add a comment above the mutex:

    /* Protects pci_devices list */
    struct mutex list_lock;

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git df3ae9703774b70a7b7758b53498a25de9f87174..bdde7d83c3ed351c21f85484add6449252be1ec7

❌ check-patch-compliance

Root cause: Commit b1c88d1 has content differences from the upstream lore patch.

Failure details:

Checking commit: FROMLIST: PCI: qcom: Set max OPP before DBI access during resume
Change is different from the one mentioned in Link

Fix:

  1. Fetch the upstream patch and compare:

    b4 am --single-message -C -l -3 <link-from-commit-message> -o /tmp/out
    git format-patch -1 b1c88d10cb51 --stdout > /tmp/pr-patch.txt
    # Compare the diff sections
    diff <(awk '/^diff/,/^--$/' /tmp/pr-patch.txt | grep -E '^[+-][^+-]') \
         <(awk '/^diff/,/^--$/' /tmp/out/*.mbx | grep -E '^[+-][^+-]')
  2. Determine if the difference is:

    • Context-only shift → Not a real issue; may be a checker limitation
    • Legitimate adaptation → Document the change in the commit message
    • Missing/extra hunk → Sync with upstream or attribute separately
  3. If the patch needs to match upstream exactly, cherry-pick from the lore mbox:

    git rebase -i <base_sha>   # mark commit as 'edit'
    # Apply the exact upstream patch
    git am /tmp/out/*.mbx
    git rebase --continue

Reproduce locally:

b4 am --single-message -C -l -3 <link> -o /tmp/out

Verdict

2 blockers to fix before merge:

  1. checkpatch WARNING — Add Closes: tag to commit acd6cd0
  2. check-patch-compliance — Resolve content mismatch in commit b1c88d1

Optional style improvements (CHECK-level):

The WARNING-level issue (missing Closes: tag) should be fixed. The CHECK-level issues are style suggestions and can be addressed if the upstream patches are being revised, but are not strict blockers.

@WeiDeng-weiden
Copy link
Copy Markdown
Author

Hi @kernel.tech.bus.pci.maint

Checked auto check, no action from my side, please review and leave comments. Thanks.

@WeiDeng-weiden
Copy link
Copy Markdown
Author

Hi @krishnachaitanya-linux
Could you please review and merge changes here?

@krishnachaitanya-linux
Copy link
Copy Markdown
Contributor

Hi @krishnachaitanya-linux Could you please review and merge changes here?

Do you want the Bluetooth changes go through pci branch ?

@WeiDeng-weiden
Copy link
Copy Markdown
Author

Hi @krishnachaitanya-linux Could you please review and merge changes here?

Do you want the Bluetooth changes go through pci branch ?

Bluetooth changes depend on pci changes. Can Bluetooth changes be submitted through a PCI branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants