Skip to content

ucsi/v1_2/lpm: Introduce GET_PD_MESSAGE command#72

Open
RobertZ2011 wants to merge 2 commits into
OpenDevicePartnership:mainfrom
RobertZ2011:add-ucsi-get-pd-message
Open

ucsi/v1_2/lpm: Introduce GET_PD_MESSAGE command#72
RobertZ2011 wants to merge 2 commits into
OpenDevicePartnership:mainfrom
RobertZ2011:add-ucsi-get-pd-message

Conversation

@RobertZ2011

@RobertZ2011 RobertZ2011 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This is an optional command that was skipped in the initial implementation.

@RobertZ2011 RobertZ2011 self-assigned this Jun 24, 2026
@RobertZ2011 RobertZ2011 requested a review from Copilot June 24, 2026 22:04
@RobertZ2011 RobertZ2011 changed the title Add ucsi get pd message ucsi/v1_2/lpm: Introduce GET_PD_MESSAGE command Jun 24, 2026
@RobertZ2011 RobertZ2011 force-pushed the add-ucsi-get-pd-message branch from f267adb to 653fcef Compare June 24, 2026 22:05
@RobertZ2011 RobertZ2011 changed the title ucsi/v1_2/lpm: Introduce GET_PD_MESSAGE command ucsi/v1_2/lpm: Introduce GET_PD_MESSAGE command Jun 24, 2026

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.

Pull request overview

This PR introduces a new ucsi::v1_2 module (feature-gated behind ucsi-v1_2) and extends the UCSI v1.2 LPM command set with the GET_PD_MESSAGE command, including encode/decode plumbing and response support.

Changes:

  • Move UCSI core types into src/ucsi/v1_2/ and gate them behind the new ucsi-v1_2 Cargo feature.
  • Add GET_PD_MESSAGE command support in ucsi::v1_2::lpm (args, response data, command routing, tests).
  • Add v1.2 CCI types and add SET_POWER_LEVEL command argument types.

Reviewed changes

Copilot reviewed 25 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Cargo.toml Adds the ucsi-v1_2 feature flag.
src/ucsi/mod.rs Replaces previous UCSI contents with a feature-gated v1_2 module export.
src/ucsi/v1_2/mod.rs New v1.2 UCSI root module (command types, headers, command/response encoding/decoding).
src/ucsi/v1_2/cci.rs New v1.2 CCI bitfield wrapper types.
src/ucsi/v1_2/lpm/mod.rs Wires GET_PD_MESSAGE into LPM command/response enums, encode/decode, and tests.
src/ucsi/v1_2/lpm/get_pd_message.rs New command definitions for GET_PD_MESSAGE (args + response data + tests).
src/ucsi/v1_2/lpm/set_power_level.rs New command definitions for SET_POWER_LEVEL (args + tests).
src/ucsi/v1_2/lpm/*.rs Updates imports to reference crate::ucsi::v1_2::* types.
src/ucsi/v1_2/ppm/*.rs Updates imports to reference crate::ucsi::v1_2::* types.
src/ucsi/v1_2/ppm/state_machine.rs Updates UCSI module imports to use the v1.2 namespace.

Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs Outdated
Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs Outdated
Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs
Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs
Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs
Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs
@RobertZ2011 RobertZ2011 force-pushed the add-ucsi-get-pd-message branch 3 times, most recently from 55d78b5 to 908db6a Compare June 26, 2026 18:06
This is an optional command that was missed in the initial
implementation. Add it.
@RobertZ2011 RobertZ2011 force-pushed the add-ucsi-get-pd-message branch from 908db6a to 1f6f3ba Compare June 26, 2026 18:09
@RobertZ2011 RobertZ2011 marked this pull request as ready for review June 26, 2026 18:13
@RobertZ2011 RobertZ2011 requested a review from a team as a code owner June 26, 2026 18:13
kurtjd
kurtjd previously approved these changes Jun 26, 2026
tullom
tullom previously approved these changes Jun 27, 2026
jerrysxie
jerrysxie previously approved these changes Jun 27, 2026
Comment thread src/ucsi/v1_2/lpm/get_pd_message.rs Outdated
@RobertZ2011 RobertZ2011 dismissed stale reviews from jerrysxie, tullom, and kurtjd via a269f73 June 29, 2026 16:55
@RobertZ2011 RobertZ2011 requested a review from kurtjd June 29, 2026 16:55
@RobertZ2011 RobertZ2011 requested review from jerrysxie and tullom June 29, 2026 16:56
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.

5 participants