Repository navigation
Use a supported GPIO event clock on Linux 5.10 - #73
Open
dhairyajangir wants to merge 1 commit into
Open
dhairyajangir wants to merge 1 commit into
dhairyajangir wants to merge 1 commit into
Conversation
Author
|
Could a maintainer authorize the Tests workflow for |
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.
GPIO ABI v2 is available in Linux 5.10, but the realtime event clock flag arrived in 5.11. The current default therefore makes both-edge requests fail with
EINVALon 5.10 unless callers explicitly select monotonic.Default to monotonic on 5.10 and retain realtime on newer kernels. Explicit clock choices still reach the kernel unchanged, including realtime on vendor kernels that backport it.
On Debian 5.10.223 in QEMU, the original default failed through both the constructor and edge setter. The patched default read rising and falling events with monotonic timestamps. On Linux 7.0.0-42, the realtime default and both explicit clock choices continued to work. All eight repository CI-mode suites passed on Python 3.12 and 3.14, and mypy passed.
Fixes #70.
AI assisted with investigation, testing, and the patch.