Repository navigation
dev-qemu: Incorporate HID time-alarm - #53
Merged
Merged
Conversation
kurtjd
force-pushed
the
dev-qemu-hidi2c
branch
from
October 9, 2026 18:08
d4fc89d to
883a502
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The 361-byte HID descriptor exceeds the known-broken 256-byte QEMU continuous-read boundary.
2 open findings
What changed in this PR
Adds HID-over-I2C time-alarm support to dev-qemu while retaining UART/MCTP access.
Changes:
- Shares the time-alarm service across HID and MCTP relays.
- Replaces the HID stub with
hidi2c-target-service. - Updates service dependencies and lockfiles.
| File | Description |
|---|---|
platform/platform-common/src/mock/mod.rs |
Exposes the shared time-alarm handle. |
platform/platform-common/src/lib.rs |
Uses the namespaced MCTP relay. |
platform/platform-common/Cargo.lock |
Updates service dependencies. |
platform/dev-qemu/src/mctp.rs |
Extracts UART/MCTP setup. |
platform/dev-qemu/src/main.rs |
Starts both transports. |
platform/dev-qemu/src/hid.rs |
Configures HID time-alarm relay. |
platform/dev-qemu/Cargo.toml |
Adds HID and time-alarm dependencies. |
platform/dev-qemu/Cargo.lock |
Resolves updated dependencies. |
platform/dev-npcx/Cargo.lock |
Updates shared dependency resolution. |
platform/dev-mec/Cargo.lock |
Updates shared dependency resolution. |
platform/dev-mcxa/Cargo.lock |
Updates shared dependency resolution. |
platform/dev-imxrt/Cargo.lock |
Updates shared dependency resolution. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Cargo Vet Audit Passed
|
kurtjd
force-pushed
the
dev-qemu-hidi2c
branch
from
October 9, 2026 18:12
883a502 to
898e14c
Compare
tullom
previously approved these changes
Oct 9, 2026
Member
Author
|
@tullom @williampMSFT Apologize for churn, just had to update cargo vet imports :( |
tullom
approved these changes
Oct 9, 2026
felipebalbi
approved these changes
Oct 9, 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.


This incorporates the latest hid-i2c-target service and the latest HID relay support for time-alarm into the
dev-qemuplatform.I kept mctp/uart support for battery and thermal (since they do not have HID drivers or HID relay support yet), but simultaneously support both uart/mcp AND hid for time-alarm (so it can receive requests from both transports during runtime). Just removed the old HID stub just to complete the handshake and replaced it with the HID time-alarm setup.
Moved the uart/mctp setup code to its own module as well.
Tested end-to-end in qemu with
ec-test-cli.exe --source windows rtc get-real-time(and other rtc commands) in WinVOS. Though this exposed a bug in my QEMU i2c controller where continuous reads of more than 256 bytes behaved incorrectly, so will have PRs up to fix that shortly.