Skip to content

Adopt public fields for UCSI types - #974

Open
RobertZ2011 wants to merge 1 commit into
OpenDevicePartnership:mainfrom
RobertZ2011:pull-in-embedded-usb-pd-ucsi-no-bincode
Open

RobertZ2011 wants to merge 1 commit into
OpenDevicePartnership:mainfrom
RobertZ2011:pull-in-embedded-usb-pd-ucsi-no-bincode

Conversation

@RobertZ2011

Copy link
Copy Markdown
Contributor

embedded-usb-pd now exposes UCSI struct fields directly instead of through getters and setters, and LPM commands carry the connector number in their arguments. Update tcpm-service, its tests and the std example to use the fields, and retarget LPM commands to the local port with MapPort.

Assisted-by: GitHub Copilot:claude-sonnet-5.5

@RobertZ2011 RobertZ2011 self-assigned this Oct 19, 2026
@RobertZ2011 RobertZ2011 added this to EC Oct 19, 2026
@RobertZ2011 RobertZ2011 moved this to In Progress in EC Oct 19, 2026
@RobertZ2011
RobertZ2011 requested a balanced review from Copilot October 19, 2026 17:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

Static review found no blocking issues in this narrowly scoped API migration; tests were not run.

No open issues 🎉

What changed in this PR

Updates TCPM service integration with embedded-usb-pd’s public UCSI fields and connector-bearing command arguments.

Changes:

  • Replaces UCSI getters and setters with direct field access.
  • Maps global connector IDs to local ports using MapPort.
  • Adapts integration tests and the std mock controller to the updated API.
File Description
tcpm-service/​tests/​ucsi.rs Updates command construction, assertions, and shared helpers.
tcpm-service/​src/​service/​ucsi.rs Migrates field access and local command mapping.
tcpm-service/​src/​service/​power.rs Reads notification flags directly.
examples/​std/​src/​lib/​type_c/​mock_controller.rs Updates connector logging and command matching.

Review effort: Balanced

@RobertZ2011
RobertZ2011 force-pushed the pull-in-embedded-usb-pd-ucsi-no-bincode branch from 047c3d6 to 4596864 Compare October 19, 2026 18:23
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Cargo Vet Audit Passed

cargo vet has passed in this PR. No new unvetted dependencies were found.

@github-actions github-actions Bot added the cargo vet PRs pending auditor review label Oct 19, 2026
embedded-usb-pd now exposes UCSI struct fields directly instead of
through getters and setters, and LPM commands carry the connector
number in their arguments. Update tcpm-service, its tests and the std
example to use the fields, and retarget LPM commands to the local port
with MapPort.

Assisted-by: GitHub Copilot:claude-sonnet-5.5

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c9a94a93-729f-451c-b08e-78887f5542e8
@RobertZ2011
RobertZ2011 force-pushed the pull-in-embedded-usb-pd-ucsi-no-bincode branch from 4596864 to ec448a4 Compare October 19, 2026 18:40
@RobertZ2011
RobertZ2011 marked this pull request as ready for review October 19, 2026 18:45
@RobertZ2011
RobertZ2011 requested review from a team as code owners October 19, 2026 18:46
@RobertZ2011
RobertZ2011 enabled auto-merge (squash) October 19, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cargo vet PRs pending auditor review

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants