refactor(power): generalise LM51xx regulator driver#471
Open
Conversation
c7522a9 to
6561bdd
Compare
Generalise the super-cap charger regulator driver into a reusable tfh,lm51xx driver for all LM51xx-family boost converters on the board: - Super-cap charger (both boards) - PVCC supply with optional mode GPIO (both boards) - 12V-caps supply (Diamond only) The driver supports an optional mode-gpios property for the FPWM/diode-emulation select pin, configured as GPIO_OUTPUT_INACTIVE at init. The optics code continues to toggle the mode pin at runtime via its gpio_dt_spec, now referenced from the pvcc_regulator DT node. Signed-off-by: Cyril Fougeray <cyril.fougeray@toolsforhumanity.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6561bdd to
032e836
Compare
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.
Replace raw GPIO control of the super-cap charger (LM5176/LM5144) with a proper Zephyr regulator driver using regulator_enable()/disable().
The custom tfh,super-cap-charger driver uses GPIO_OUTPUT_INACTIVE at init (unlike regulator-fixed which uses GPIO_OUTPUT), preventing PCA95xx GPIO expanders from briefly enabling the charger at boot due to their default output register being all-1s.