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

drivers: counter: Add MCP7940N property to enable VBAT backup #84536

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

Conversation

Lefucjusz
Copy link
Contributor

This PR adds a new devicetree property that allows enabling external battery backup functionality.

@@ -757,6 +762,7 @@ static DEVICE_API(counter, mcp7940n_api) = {
}, \
.i2c = I2C_DT_SPEC_INST_GET(index), \
.int_gpios = GPIO_DT_SPEC_INST_GET_OR(index, int_gpios, {0}), \
.vbat_enable = DT_INST_PROP_OR(index, vbat_enable, false) \
Copy link
Collaborator

Choose a reason for hiding this comment

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

For booleans you can just use DT_INST_PROP(), it will always be defined to true or false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know about it, thanks! Fixed

This PR adds a new devicetree property
that allows enabling external battery
backup functionality.

Signed-off-by: Marcin Lyda <[email protected]>
@Lefucjusz Lefucjusz force-pushed the add_mcp7940_vbat_enable_property branch from 09f5ab4 to 338b684 Compare January 24, 2025 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants