Skip to content

Shikra charger det 618y - #1590

Open
Kriskura176767 wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
Kriskura176767:shikra-charger-det-618y
Open

Kriskura176767 wants to merge 2 commits into
qualcomm-linux:qcom-6.18.yfrom
Kriskura176767:shikra-charger-det-618y

Conversation

@Kriskura176767

Copy link
Copy Markdown
Contributor

QUSB2 Phy HW is capable of doing BC.1.2 charger detection. On most of the
platforms, the charger detection is done by PMIC. But on Shikra CQM/CQS
platforms, the PM4125 doesn't have ability to do charger detection and
that responsibility is delegated to QUSB2 Phy which acts on the DP/DM
lines in its control to get the job done.

During process of charger detection, if the controller is supposed to
enter device mode, the charger is detected as SDP/CDP/DCP. The controller
must enter device mode only if the detected charger is SDP/CDP. In case of
DCP, the phy can be turned off after detection. If the controller must
enter host mode, charger detection can be skipped and hence the phy must
know the role before the controller so that appropriate decision can be
taken whether the controller must enter device/host mode or not.

Intention of adding remote endpoints and usb-role-switch property binding
support is as follows:

a) The DP/DM lines do go through the phy to the controller i.e., the phy
exists between connector and controller. Hence adding remote endpoints
depicting the same.

b) Although the usb2 phy is not the entity doing role switching, it still
does need to decide which mode the controller must move into and hence
adding usb-role-switch property to allow role notifications from charger
to go to controller via phy.

Also the driver changes do the following:

a) Refactor phy enable/disable calls to control regulators and clocks.

b) Let the usb-role information coming from PM4125 to pass through the phy
so that when a vbus active signal is detected, the phy can check if its
SDP/CDP/DCP and pass on the role to controller only when the charger is
SDP/CDP. In case of host mode, the role is forwarded without any charger
detection.

c) Since the controller probe relies on phy probe to be completed first,
during phy probe, it won't be possible to get role-switch handle of the
controller. Hence check for controller role switch whenever a role info
is obtained from the connector node.

Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-0-5a9d919c66b5@oss.qualcomm.com/

CRs-Fixed: 4759581

QUSB2 Phy HW is capable of doing BC.1.2 charger detection. On most of the
platforms, the charger detection is done by PMIC. But on Shikra CQM/CQS
platforms, the PM4125 doesn't have ability to do charger detection and
that responsibility is delegated to QUSB2 Phy which acts on the DP/DM
lines in its control to get the job done.

During process of charger detection, if the controller is supposed to
enter device mode, the charger is detected as SDP/CDP/DCP. The controller
must enter device mode only if the detected charger is SDP/CDP. In case of
DCP, the phy can be turned off after detection. If the controller must
enter host mode, charger detection can be skipped and hence the phy must
know the role before the controller so that appropriate decision can be
taken whether the controller must enter device/host mode or not.

Intention of adding remote endpoints and usb-role-switch property binding
support is as follows:

a) The DP/DM lines do go through the phy to the controller i.e., the phy
exists between connector and controller. Hence adding remote endpoints
depicting the same.

b) Although the usb2 phy is not the entity doing role switching, it still
does need to decide which mode the controller must move into and hence
adding usb-role-switch property to allow role notifications from charger
to go to controller via phy.

Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4759581 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4759581

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qlijarvis

Copy link
Copy Markdown

PR #1590 — validate-patch

PR: #1590

Verdict Issues Detailed Report
✅ 0 Full report

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/ (present in patch 1/2 commit message)

  2. Lore link matches PR commits: Yes — diff content is identical to lore patches; only index lines differ due to different base commits (expected and acceptable)

  3. Upstream patch status: ⏳ In review — posted to lore.kernel.org on 2026-11-11; only automated sashiko-bot review comments present (2 potential issues flagged: Medium - usb-role-switch overloaded for BC1.2 detection, Low - incomplete usb-role-switch and ports schema); no maintainer acceptance/rejection signals yet; no Reviewed-by:/Acked-by: tags; patch is under community review

  4. PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #1590 - Add charger detection support for Shikra
Upstream commit: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/
Verdict: ✅ PASS

Commit Message

Check Status Note
Subject matches upstream ✅ Patch 1: FROMLIST: prefix added correctly; Patch 2: subject identical
Body preserves rationale ✅ Both patches preserve complete commit message body from lore
Fixes tag present/correct N/A No Fixes tag in upstream patches
Authorship preserved ✅ From: matches lore author Krishna Kurapati for both patches; FROMLIST: prefix allows submitter to differ from author, original author's Signed-off-by: is present
Backport note (if applicable) N/A FROMLIST: patches do not require backport notes

Diff

File Status Notes
Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml ✅ Diff content identical to lore patch; only index lines differ due to different base commits
drivers/phy/qualcomm/phy-qcom-qusb2.c ✅ Diff content identical to lore patch; only index lines differ due to different base commits

Issues

None found. The PR patches faithfully represent the upstream lore patches.

Verdict

Merge as-is. Both commits correctly use the FROMLIST: prefix, preserve the original author's identity and commit message, include the proper lore link, and contain diffs that are identical to the upstream posting.

Final Summary

  1. Lore link present: Yes — https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-1-5a9d919c66b5@oss.qualcomm.com/ (present in patch 1/2 commit message)

  2. Lore link matches PR commits: Yes — diff content is identical to lore patches; only index lines differ due to different base commits (expected and acceptable)

  3. Upstream patch status: ⏳ In review — posted to lore.kernel.org on 2026-11-11; only automated sashiko-bot review comments present (2 potential issues flagged: Medium - usb-role-switch overloaded for BC1.2 detection, Low - incomplete usb-role-switch and ports schema); no maintainer acceptance/rejection signals yet; no Reviewed-by:/Acked-by: tags; patch is under community review

  4. PR present in qcom-next/topics: Yes — both commits present in topics branch (commit 1/2: 9b8dad5cea961fd3f2e171ff867dee5a6ce35b38, commit 2/2: 50118ece31e7b81fe96ff8703e3d8c550dd8aa0d)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 8fffe4778122b8d4fac6dd8396a2de99e05be00f
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] FROMLIST: dt-bindings: phy: qcom,qusb2: Add support for partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 9b8dad5cea961fd3f2e171ff867dee5a6ce35b38 present
2/2 [PATCH 2/2] phy: qcom: qusb2: Add charger detection support partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 50118ece31e7b81fe96ff8703e3d8c550dd8aa0d present

Final Status

overall_status: PASS
present_commits: 2/2
partial_commits: 0/2
missing_commits: 0/2
topics_checked_for_commits: 2/2
final_summary: PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #1590 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ⚠️ 14 style checks (alignment, mutex comment)
dt-binding-check ✅ Passed
dtb-check ⏭️ Skipped - no DTS changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Missing prefix on commit 2/2
tag-check N/A Skipped - qcom-next branch
qcom-next-check ✅ Both commits present in topics

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1590 - phy: qcom: qusb2: Add charger detection support
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/46377106447
Target Branch: qcom-next

Checker Result Summary
checkpatch ⚠️ 14 style checks (alignment, mutex comment)
dt-binding-check ✅ Passed
dtb-check ⏭️ Skipped - no DTS changes
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ❌ Missing prefix on commit 2/2
tag-check N/A Skipped - qcom-next branch
qcom-next-check ✅ Both commits present in topics

❌ check-patch-compliance

Root cause: Commit 2/2 (9660d2842eea) subject line does not start with a required prefix.

Failure details:

Checking commit: phy: qcom: qusb2: Add charger detection support
Commit summary does not start with a required prefix

The second commit in this PR lacks a mandatory subject prefix. The check-patch-compliance checker requires all commits to start with one of: FROMLIST:, FROMGIT:, UPSTREAM:, or BACKPORT:.

Fix:

git rebase -i <base_sha>   # mark commit 9660d2842eea as 'edit'
git commit --amend -m "FROMLIST: phy: qcom: qusb2: Add charger detection support"
git rebase --continue

Choose the appropriate prefix:

  • If this patch is posted to lore.kernel.org → use FROMLIST:
  • If taken from a maintainer tree → use FROMGIT:
  • If merged into mainline → use UPSTREAM:
  • If backported with modifications → use BACKPORT:

Based on the PR context (commit 1/2 uses FROMLIST: and both have lore links), this should be FROMLIST:.

Reproduce locally:

cd kernel
./kernel-checkers/check-patch-compliance.sh <base_sha> <head_sha>

⚠️ checkpatch

Root cause: Commit 2/2 has 14 style CHECK warnings (13 alignment issues, 1 missing mutex comment).

Failure details:

9660d2842eeafb2ab89d181799e812e5b726b3f2 total: 0 errors, 0 warnings, 14 checks, 696 lines checked

CHECK: struct mutex definition without comment
#145: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:554:

CHECK: Alignment should match open parenthesis
#149: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:558:
#165: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:574:
#170: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:579:
#360: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:769:
#364: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:773:
#366: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:775:
#368: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:777:
#370: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:779:
#376: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:785:
#387: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:796:
#389: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:798:
#461: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:870:
#548: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:957:

Analysis:

These are CHECK: level warnings (not ERROR: or WARNING:), which are style suggestions. The kernel coding style prefers:

  1. Mutex comment: Add a comment above the mutex declaration explaining what it protects
  2. Alignment: Multi-line function calls should align continuation lines with the opening parenthesis

Fix:

For the mutex (line 554):

/* Protects charger detection state and role switching */
struct mutex lock;

For alignment issues, adjust indentation so continuation lines align with the opening (:

// Before:
queue_delayed_work(system_freezable_wq,
		&qphy->port_det_w, msecs_to_jiffies(delay));

// After:
queue_delayed_work(system_freezable_wq,
		   &qphy->port_det_w, msecs_to_jiffies(delay));

Note: These are style checks, not blockers. Many maintainers accept patches with CHECK: warnings if the code is otherwise correct. However, fixing them improves code quality and reduces review friction.

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git <base>..<head>

✅ Other Checkers

All other checkers passed:

  • dt-binding-check: ✅ Binding YAML validated successfully
  • dtb-check: ⏭️ Skipped (no DTS file changes)
  • sparse-check: ✅ No sparse warnings in modified code
  • check-uapi-headers: ✅ No UAPI/ABI changes

📋 Additional Context

Integration Status: Both commits are already present in the kernel topics:

  • Commit 1/2: Present at 9b8dad5cea96 in topics
  • Commit 2/2: Present at 50118ece31e7 in topics

This indicates the patches have been integrated into the topic branches, which is expected for qcom-next workflow.


Verdict

1 blocker to fix before merge:

  1. ❌ check-patch-compliance: Add FROMLIST: prefix to commit 2/2 subject line

Optional improvements:

  1. ⚠️ checkpatch: Fix 14 style checks (13 alignment + 1 mutex comment) - recommended but not blocking

The missing prefix is a hard requirement for the check-patch-compliance checker. The checkpatch style issues are optional improvements that would enhance code quality but are not merge blockers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

phy: qcom: qusb2: Add charger detection support

missing appropriate subject prefix .

QUSB2 Phy is capable of performing BC.1.2 Charger detection by controlling
the dp/dm lines. On platforms where the PMIC isn't capable of performing
charger detection, the responsibility is delegated to the phy.

On Shikra CQM/CQS platforms, the PM4125 relies on QUSB2 Phy to perform
charger detection. As part of this, the following changes are being done:

a) Refactor phy enable/disable calls to control regulators and clocks.

b) Let the usb-role information coming from PM4125 to pass through the phy
so that when a vbus active signal is detected, the phy can check if its
SDP/CDP/DCP and pass on the role to controller only when the charger is
SDP/CDP. In case of host mode, the role is forwarded without any charger
detection.

c) Since the controller probe relies on phy probe to be completed first,
during phy probe, it won't be possible to get role-switch handle of the
controller. Hence check for controller role switch whenever a role info
is obtained from the connector node.

missing Link: tag that points to upstream submitted patch

QUSB2 Phy is capable of performing BC.1.2 Charger detection by controlling
the dp/dm lines. On platforms where the PMIC isn't capable of performing
charger detection, the responsibility is delegated to the phy.

On Shikra CQM/CQS platforms, the PM4125 relies on QUSB2 Phy to perform
charger detection. As part of this, the following changes are being done:

a) Refactor phy enable/disable calls to control regulators and clocks.

b) Let the usb-role information coming from PM4125 to pass through the phy
so that when a vbus active signal is detected, the phy can check if its
SDP/CDP/DCP and pass on the role to controller only when the charger is
SDP/CDP. In case of host mode, the role is forwarded without any charger
detection.

c) Since the controller probe relies on phy probe to be completed first,
during phy probe, it won't be possible to get role-switch handle of the
controller. Hence check for controller role switch whenever a role info
is obtained from the connector node.

Link: https://lore.kernel.org/all/20261111-shikra-qusb2-charger-det-v1-2-5a9d919c66b5@oss.qualcomm.com/
Signed-off-by: Krishna Kurapati <krishna.kurapati@oss.qualcomm.com>
@Kriskura176767
Kriskura176767 force-pushed the shikra-charger-det-618y branch from 9660d28 to 7a13281 Compare December 2, 2026 14:49
@qswat-orbit-external

Copy link
Copy Markdown

Merge Check Failed: No Change Task Found

No associated change tasks found for CR 4759581 on any of the following entities:

Entities:

  • kernel.qli.2.0

CR: 4759581

Please ensure the CR has a change task associated with at least one of the entities for this branch.

@qcomlnxci
qcomlnxci requested a review from a team December 2, 2026 14:52
@qlijarvis

Copy link
Copy Markdown

PR #1590 — validate-patch

PR: #1590

Verdict Issues Detailed Report
✅ 0 Full report

Final Summary

  1. Lore link present: Yes — both commits include correct Link: tags pointing to lore.kernel.org message-IDs
  2. Lore link matches PR commits: Yes — diff content is identical; commit messages preserved verbatim; only index lines differ due to different base trees (expected and correct)
  3. Upstream patch status: ⏳ Decision Pending — patches posted Nov 11, 2026; automated CI feedback received; no maintainer decision yet
  4. PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics
Verdict: ✅ — click to expand

🔍 Patch Validation

PR: #1590 - Add charger detection support for Shikra
Upstream commits:

Commit Message

Check Status Note
Subject matches upstream ✅ Both commits correctly add FROMLIST: prefix to upstream subjects
Body preserves rationale ✅ Full commit message body preserved verbatim from lore
Fixes tag present/correct N/A No Fixes tag in upstream patches
Authorship preserved ✅ From: matches lore author (Krishna Kurapati krishna.kurapati@oss.qualcomm.com) for both commits
Backport note (if applicable) N/A FROMLIST: prefix used correctly; no backport note needed
Link tag present ✅ Both commits include correct Link: tags pointing to lore message-IDs
Signed-off-by preserved ✅ Original author's Signed-off-by: preserved in both commits

Diff

File Status Notes
Documentation/devicetree/bindings/phy/qcom,qusb2-phy.yaml ✅ Diff content identical; only index line differs (expected for different base trees)
drivers/phy/qualcomm/phy-qcom-qusb2.c ✅ Diff content identical; only index line differs (expected for different base trees)

Diff comparison details:

  • Patch 1/2: The dt-binding changes are identical between PR and lore. The ports and usb-role-switch properties match exactly.
  • Patch 2/2: The driver implementation changes are identical. Both add charger detection support with the same register definitions, state machines, and logic.
  • Index line differences (ddbddeec6fb16 vs 001fd0ccc985 for patch 1, ab7437e7b7510 vs 2e5fdb620cb2 for patch 2) are expected — the PR is based on a different tree (qcom-next) than the upstream submission base.

Upstream Patch Status

Commit Community Verdict
dt-bindings: phy: qcom,qusb2: Add support for remote endpoints ⏳ Decision Pending — Posted Nov 11, 2026; sashiko-bot CI review found 2 potential issues (Medium: usb-role-switch overloaded for BC1.2 detection; Low: incomplete schema); no maintainer decision yet
phy: qcom: qusb2: Add charger detection support ⏳ Decision Pending — Posted Nov 11, 2026; part of 2-patch series; no maintainer review or acceptance signal found in thread

Evidence from lore thread:

  • Both patches posted to linux-arm-msm@vger.kernel.org on Nov 11, 2026
  • Addressed to subsystem maintainers: Vinod Koul (PHY), Rob Herring, Krzysztof Kozlowski, Conor Dooley (DT bindings)
  • Only automated CI feedback present (sashiko-bot); no human maintainer replies found in fetched mbox
  • No applied, queued, Reviewed-by:, Acked-by:, or NAK signals present
  • Thread appears to be in early review stage

qcom-next/topics Presence

Commit Status
dt-bindings: phy: qcom,qusb2: Add support for remote endpoints ✅ Present in topics as 9b8dad5cea961fd3f2e171ff867dee5a6ce35b38
phy: qcom: qusb2: Add charger detection support ✅ Present in topics as 50118ece31e7b81fe96ff8703e3d8c550dd8aa0d

From integration_presence_report.md:

  • Both commits found with exact patch-id match in kernel topics branches
  • Overall status: PASS — all 2/2 commits present in qcom-next or topics

Issues Found

None. The PR faithfully represents the upstream lore patches.

Recommendation

Merge as-is. Both commits are faithful representations of the upstream lore patches with correct FROMLIST: prefixes, preserved authorship, proper Link: tags, and identical diff content. The patches are already present in the kernel topics branches, confirming they are part of the Qualcomm kernel integration workflow. The upstream patches are under review on the mailing list (posted Nov 11, 2026) and have not yet been accepted or rejected by maintainers.

Final Summary

  1. Lore link present: Yes — both commits include correct Link: tags pointing to lore.kernel.org message-IDs
  2. Lore link matches PR commits: Yes — diff content is identical; commit messages preserved verbatim; only index lines differ due to different base trees (expected and correct)
  3. Upstream patch status: ⏳ Decision Pending — patches posted Nov 11, 2026; automated CI feedback received; no maintainer decision yet
  4. PR present in qcom-next/topics: Yes — both commits present in topics with exact patch-id matches (9b8dad5cea96 and 50118ece31e7)

Deterministic Integration Presence

Integration Presence Report

This report is generated by Jarvis before validate-patch runs.
It is the authoritative source for whether PR changes are already present
in qcom-next or in the kernel topic branches.

Kernel repo: /local/mnt/workspace/sgaud/Qgenie/image_pipeline/kernel
qcom-next ref: 27cd2ba09b3377fea4e69efb419d44ca159c2bac
topics remote: topics -> https://github.com/qualcomm-linux/kernel-topics
topics fetch: fetched

Commit Subject qcom-next topics Final
1/2 [PATCH 1/2] FROMLIST: dt-bindings: phy: qcom,qusb2: Add support for partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 9b8dad5cea961fd3f2e171ff867dee5a6ce35b38 present
2/2 [PATCH 2/2] FROMLIST: phy: qcom: qusb2: Add charger detection support partial - subject or partial tree evidence found, but full change was not verified present - exact patch-id match at 50118ece31e7b81fe96ff8703e3d8c550dd8aa0d present

Final Status

overall_status: PASS
present_commits: 2/2
partial_commits: 0/2
missing_commits: 0/2
topics_checked_for_commits: 2/2
final_summary: PR present in qcom-next/topics: Yes - all 2 commit(s) are present in qcom-next or topics

@qlijarvis

Copy link
Copy Markdown

PR #1590 — checker-log-analyzer

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

Checker Result Summary
Checker Result Summary
checkpatch ❌ 14 alignment checks (style warnings)
dt-binding-check ✅ Passed
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ✅ Passed
tag-check ✅ Both commits have valid FROMLIST: prefix

Detailed report: Full report

Checker analysis — click to expand

🤖 CI Checker Analysis (checker-log-analyzer)

PR: #1590 - FROMLIST: dt-bindings: phy: qcom,qusb2: Add support for remote endpoints + charger detection
Source: https://github.com/qualcomm-linux/kernel-config/actions/runs/46907594317
Target branch: qcom-6.18.y

Checker Result Summary
checkpatch ❌ 14 alignment checks (style warnings)
dt-binding-check ✅ Passed
dtb-check ⏭️ Skipped (no DTS changes)
sparse-check ✅ Passed
check-uapi-headers ✅ Passed
check-patch-compliance ✅ Passed
tag-check ✅ Both commits have valid FROMLIST: prefix

❌ checkpatch

Root cause: Alignment style issues in commit 7a13281f2d05 ("FROMLIST: phy: qcom: qusb2: Add charger detection support") — function arguments and continuation lines not aligned with opening parenthesis.

Failure details:

CHECK: Alignment should match open parenthesis
#166: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:574:
+	power_supply_set_property(qphy->usb_psy, POWER_SUPPLY_PROP_USB_TYPE,
+									&pval);

CHECK: Alignment should match open parenthesis
#171: FILE: drivers/phy/qualcomm/phy-qcom-qusb2.c:579:
+static bool qusb_phy_chg_det_status(struct qusb2_phy *qphy,
+						enum chg_det_state state)

[... 12 more similar alignment issues ...]

7a13281f2d051ba1602aaeb4905e7d747e277a74 total: 0 errors, 0 warnings, 14 checks, 696 lines checked

All 14 issues are CHECK: level (style suggestions), not ERROR: or WARNING: (blockers).

Fix: Align continuation lines with the opening parenthesis:

// Before:
power_supply_set_property(qphy->usb_psy, POWER_SUPPLY_PROP_USB_TYPE,
								&pval);

// After:
power_supply_set_property(qphy->usb_psy, POWER_SUPPLY_PROP_USB_TYPE,
			  &pval);

Apply to all 14 instances in drivers/phy/qualcomm/phy-qcom-qusb2.c:574,579,769,773,775,777,779,785,796,798,870,957.

Reproduce locally:

./scripts/checkpatch.pl --strict --ignore FILE_PATH_CHANGES --git 446058cd9f670b3e4650cef81dbe209c5d1c474c..565bf13465fb79566740b8ed79c203e64040aa23

Fix command:

git rebase -i 446058cd9f670b3e4650cef81dbe209c5d1c474c   # mark 7a13281f2d05 as 'edit'
# Fix alignment in drivers/phy/qualcomm/phy-qcom-qusb2.c
git add drivers/phy/qualcomm/phy-qcom-qusb2.c
git commit --amend --no-edit
git rebase --continue

Verdict

14 style checks to fix before merge. All issues are CHECK: level (alignment style) — not blockers, but should be fixed to match kernel coding style. No functional issues detected. All other checkers passed cleanly.

@Kriskura176767

Copy link
Copy Markdown
Contributor Author

before sending to upstream I did "b4 prep --check" and it showed no errors on the upstream workspace. Hence it ported the code to 0.0 and 2.0:

● 58c575f4be63: dt-bindings: phy: qcom,qusb2: Add support for remote endpoints
● c8004eecaca3: phy: qcom: qusb2: Add charger detection support

Success: 2

After checking these checkpatch errors here on 2.0 I see that even on my upstream workspace "git format-patch -2" && (./scripts/checkpatch --strict 0001-phy-qcom-qusb2-Add-charger-detection-support.patch) shows the same checkpatch errors.

But these are code alignment issues w.r.t parenthesis:
"CHECK: Alignment should match open parenthesis"

Should we fix them up on this PR or let them be.

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.

3 participants