Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bq769x2: Add support for configuring REG0 (pre-regulator) #86

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martinjaeger
Copy link
Member

It was not possible to enable the pre-regulator REG0, which is required in most cases when REG1 and REG2 are needed. In addition to that, bq769x2_configure_voltage_regs did not correctly update the actually configured regulators.

Fixes #85

Copy link

@vlebedev-ora vlebedev-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The technical reference says that one should no change voltage setting on REG 1 and REG2 if it is enabled. So the correct setting procedure seems to be:

  1. Ensure that REG1_EN and REG2_EN REG_0 are OFF.
  2. set the voltages and end REG{1,2}_EN bits as needed
  3. Optionally set REG0_EN.

Don't you think having both reg0_config field AND BIT(0) in enable_vregs is little bit confusing to ensure the correct sequence?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting alredy set bit in vresg_enable
2 participants