Skip to content

drivers: current_sense: add offset binding #87988

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

Merged
merged 1 commit into from
May 28, 2025

Conversation

brandon-exact
Copy link
Contributor

@brandon-exact brandon-exact commented Apr 1, 2025

some current sense amplifiers have a non zero offset voltage
that correlates to zero current. adding this offset voltage binding
allows the driver to be used with this type of circuitry.

Signed-off-by: Brandon Allen brandon.allen@exacttechnology.com

@github-actions github-actions bot added area: Devicetree area: ADC Analog-to-Digital Converter (ADC) labels Apr 1, 2025
rruuaanng
rruuaanng previously approved these changes Apr 2, 2025
type: int
default: 0
description: |
The zero current voltage in mV. The default is <0>. The maximum value is <65535>.
Copy link
Contributor

Choose a reason for hiding this comment

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

@brandon-exact
Copy link
Contributor Author

brandon-exact commented Apr 3, 2025

for more context, here is screenshot of the current sensors datasheet I used in the test
image

@fabiobaltieri I noticed you reviewed the initial PR for this, maybe you could take a look aswell and let me know what you think? Maybe an alternative would be to setup a new binding called current-sense-opamp?

fabiobaltieri
fabiobaltieri previously approved these changes Apr 4, 2025
@fabiobaltieri fabiobaltieri assigned mbolivar and unassigned mbolivar Apr 4, 2025
@brandon-exact
Copy link
Contributor Author

resolved conflicts

JordanYates
JordanYates previously approved these changes Apr 9, 2025
@brandon-exact
Copy link
Contributor Author

Im not sure why that test failed; I do not see it failing on main and my branch is rebased. Anything I need to do?

@JordanYates
Copy link
Collaborator

JordanYates commented Apr 10, 2025

Im not sure why that test failed; I do not see it failing on main and my branch is rebased. Anything I need to do?

I have seen that test fail on some of my PRs as well, it is unrelated. Just unlucky that twister decided that it should be part of this PR's testplan. You don't need to do anything.

Created #88396

fabiobaltieri
fabiobaltieri previously approved these changes Apr 10, 2025
@brandon-exact
Copy link
Contributor Author

@mbolivar gentle ping

yperess
yperess previously approved these changes Apr 11, 2025
some current sense amplifiers have a non zero offset voltage
that correlates to zero current. adding this offset voltage binding
allows the driver to be used with this type of circuitry.

Signed-off-by: Brandon Allen <brandon.allen@exacttechnology.com>
Copy link

@kartben kartben merged commit 979933c into zephyrproject-rtos:main May 28, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ADC Analog-to-Digital Converter (ADC) area: Devicetree area: Sensors Sensors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants