Skip to content

Select TimeAlarm source from emulated GPIO2 - #51

Draft
dymk wants to merge 2 commits into
OpenDevicePartnership:mainfrom
dymk:dymk/time-alarm-power-input
Draft

dymk wants to merge 2 commits into
OpenDevicePartnership:mainfrom
dymk:dymk/time-alarm-power-input

Conversation

@dymk

@dymk dymk commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Add an opt-in time-alarm-power-input mode. It checks GPIO2 initialization before starting TimeAlarm, selects AC for high and DC for low, and updates the service when the input changes. GPIO1 remains the wake output; GPIO0 remains HID. Default builds and explicit construction-time AC/DC fixtures remain unchanged.

This is QEMU-emulated external power, not physical hardware detection or Windows power-policy notification. Uninitialized input fails startup rather than silently selecting DC.

Depends on #50 and OpenDevicePartnership/odp-qemu-builder#12. This is the single commit after #50, now on upstream's HID TimeAlarm (#53) and using #50's init_with_time_alarm_configure. The temporary HAL fork pin keeps the I2C transaction-boundary fix and adds the generated input-validity register and typed accessor.

Default, wake-fixture, and power-input release builds, strict Clippy, fmt, and cargo vet pass. Real FF-A/SP/EC source-switch qualification passes for both cold AC and DC starts in OpenDevicePartnership/odp-platform-qemu-arm-virt#183, including INSTANTLY versus NEVER after acknowledged source changes; the four retention wake cases also pass with this EC.

Part of OpenDevicePartnership/embedded-services#689. Windows-managed S4 work is separate.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Cargo Vet Audit Passed

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

felipebalbi and others added 2 commits October 13, 2026 19:02
Configure an explicit AC or DC source before starting the timer runner
and drive its latched wake level on GPIO1. Disable initial fixture alarms
to keep startup idle-low and leave ordinary initialization unchanged.

Preserve upstream's shared HID TimeAlarm and MCTP services and the
one-argument initializer. Pin the rebased library wake changes and retain
the HAL's zero-gap I2C transaction-boundary fix.

Assisted-by: GitHub Copilot:gpt-6-astra

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require an initialized input before starting the runner and track source changes with GPIO level interrupts. Preserve default builds and the construction-time wake fixtures.

Assisted-by: GitHub Copilot:gpt-6-astra

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dymk
dymk force-pushed the dymk/time-alarm-power-input branch from f12cf11 to f27725d Compare October 16, 2026 22:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants