Add port commands for getting Discovered SVIDs, Discover Identity, executing Hard Reset#820
Merged
Merged
Conversation
Cargo Vet Audit Passed
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new Type‑C/USB‑PD port commands to expose discovered SVIDs, retrieve cached Discover Identity responses (SOP/SOP′), and trigger a Hard Reset through the embedded-services Type‑C controller abstraction and the type-c-service wrapper/driver layers.
Changes:
- Extend the Type‑C controller/external command enums and context APIs with GetDiscoveredSvids, GetDiscoverIdentity* (SOP/SOP′), and HardReset.
- Implement these new controller APIs for the TPS6699x driver and the std mock controller.
- Wire the new external commands through the type-c-service port command handler and PD wrapper.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| type-c-service/src/wrapper/pd.rs | Routes new PortCommandData variants to controller driver calls and returns new PortResponseData variants. |
| type-c-service/src/service/port.rs | Adds service-level handlers for the new external port commands. |
| type-c-service/src/driver/tps6699x.rs | Implements controller trait methods for discovered SVIDs, hard reset, and Discover Identity response retrieval. |
| examples/std/src/lib/type_c/mock_controller.rs | Extends the mock controller to satisfy the updated Controller trait. |
| embedded-service/src/type_c/external.rs | Adds new external command/response variants and helper functions for the new APIs. |
| embedded-service/src/type_c/controller.rs | Adds DiscoveredSvids type, new controller trait methods, lookup helper, and ContextToken APIs. |
| Cargo.lock | Updates lockfile for dependency revisions (notably embedded-usb-pd and tps6699x). |
RobertZ2011
requested changes
Apr 30, 2026
RobertZ2011
approved these changes
May 4, 2026
kurtjd
approved these changes
May 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on