Repository navigation
w1: masters: w1-uart: Retry a faulted HDQ link every minute - #182
Merged
Merged
Conversation
Since the consecutive-timeout cap, a guarded HDQ link that misses five reads in a row stops for good, until a reboot or rebind. A gauge that goes quiet only for a while, around suspend and resume for example, then takes the battery away for the rest of the session. Let a faulted link try again: once W1_UART_HDQ_RETRY_SECS (60 s) have passed since the fault, the next reset or read goes to the wire. A good read clears the fault count; one more exhausted read, or any other error, faults the link again at once for another minute. A dead gauge so costs one short attempt a minute, and only the first fault is logged as an error. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
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.
Follow-up to #180 (iPad Pro 2 battery gauge, A10X).
Today on main: if the battery gauge misses five reads in a row, the driver stops talking to it until the next reboot, so a short gauge silence (around suspend, for example) makes the battery disappear from the desktop for the rest of the session.
After this: a faulted link tries one read again every 60 s. If the gauge answers, the battery comes back by itself; if not, it waits another minute. A dead gauge costs one short attempt a minute, and only the first fault is logged as an error.
Only the guarded HDQ variant (
apple,j120-hdq-uart, the iPad Pro 2) is affected.