Repository navigation
power: supply: apple_tristar_charger: Shared input sag hook, confirmed droop - #175
Merged
Merged
Conversation
… chip hook The VBUS droop backoff ran inline in the poll loop and only knew the Orion VBUS ADC. Boards without one (the A10's J127/J128, for example) can still tell a sagging source, from the PMIC's input-collapse state, but had no place to plug that in. Add an input_sag() hook to tristar_chip_info that reports none, unsure, droop or fault, and act on it in one shared place, called from the ramp and the guard. The VBUS ADC reader becomes the hook of both PMICs; it does nothing on boards whose device tree gives no VBUS channel. The thresholds, the read retries and the one-step backoff are unchanged. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
…ng the limit One VBUS sample below 4.5 V lowered the input limit for the rest of the attachment. A short dip during a load step, or one noisy conversion, is enough for that, and the attachment then charges slower until unplug. Hold the step on the first sag sample and lower the limit only when the next sample still shows it, as the SN2400 driver's foldback debounce does. Faults (overvoltage, brownout, a VBUS still unreadable after its retries) fall back at once as before. 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 #164 (Grier Johnson's A10X charging fix).
input_sag()hook intristar_chip_info, acted on in one shared place called from the ramp and the guard. Boards without a VBUS ADC (J127/J128 through the PMIC's input-collapse state) can plug in later. Thresholds, read retries and the one-step backoff are unchanged; boards without a VBUS channel in their device tree see no change.Compile-checked with
orchard build hardware-check --platform apple-16k --kernel(the charger builds without warnings).Assisted-by: LLM