-
Notifications
You must be signed in to change notification settings - Fork 7.3k
drivers: fuelgauge: Add Onsemi LC709203F driver #89000
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
base: main
Are you sure you want to change the base?
drivers: fuelgauge: Add Onsemi LC709203F driver #89000
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an Onsemi LC709203F fuel gauge driver along with samples, DTS binding, header updates, and an emulator implementation.
- Introduces main sample application to demonstrate fuel gauge usage.
- Updates fuel gauge header definitions and DTS binding to support new properties.
- Provides an emulator implementation for testing.
Reviewed Changes
Copilot reviewed 13 out of 27 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
samples/fuel_gauge/lc709203f/src/main.c | Implements sample app; contains a redundant dev check. |
samples/fuel_gauge/lc709203f/sample.yaml | Provides sample configuration for the fuel gauge. |
include/zephyr/drivers/fuel_gauge.h | Adds new fuel gauge properties. |
dts/bindings/fuel-gauge/onnn,lc709203f.yaml | Adds DTS binding for the LC709203F fuel gauge. |
drivers/fuel_gauge/lc709203f/lc709203f.h | Declares registers and APIs for the new driver. |
drivers/fuel_gauge/lc709203f/emul_lc709203f.c | Implements an emulator for the LC709203F fuel gauge. |
Files not reviewed (14)
- boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2.rst: Language not supported
- boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2_tft.rst: Language not supported
- boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2_tft_reverse.rst: Language not supported
- drivers/fuel_gauge/CMakeLists.txt: Language not supported
- drivers/fuel_gauge/Kconfig: Language not supported
- drivers/fuel_gauge/lc709203f/CMakeLists.txt: Language not supported
- drivers/fuel_gauge/lc709203f/Kconfig: Language not supported
- samples/fuel_gauge/lc709203f/CMakeLists.txt: Language not supported
- samples/fuel_gauge/lc709203f/README.rst: Language not supported
- samples/fuel_gauge/lc709203f/boards/adafruit_feather_esp32s2.conf: Language not supported
- samples/fuel_gauge/lc709203f/boards/adafruit_feather_esp32s2.overlay: Language not supported
- samples/fuel_gauge/lc709203f/boards/adafruit_feather_esp32s2_tft.conf: Language not supported
- samples/fuel_gauge/lc709203f/boards/adafruit_feather_esp32s2_tft.overlay: Language not supported
- samples/fuel_gauge/lc709203f/prj.conf: Language not supported
b168287
to
aedd521
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some early feedback
boards/adafruit/feather_esp32s2/doc/adafruit_feather_esp32s2.rst
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please separate in multiple commits as it is doing more than just adding a new driver (i.e. adding new fuel gauge property typed)
I will split the commits asap |
Thanks a lot for this fast reply! |
b1096dd
to
7569d0a
Compare
I split up the commit into multiple commits in a way which I think makes sense |
overview which is still missing or needs/should/wished to be changed
|
ddebd24
to
d9af45c
Compare
d9af45c
to
5ffc6da
Compare
@kartben @aaronemassey @teburd I have one questiong regarding the |
If you find missing/out of date docs then yes please send a separate PR updating them. |
Please review your commits and messages. The very first commit has added properties but the commit title is "drivers: fuelgauge: Add Onsemi LC709203F driver". This should be more like...
This commit should have no formatting changes and only the changes needed to add the attributes. Basically the commits need to be cleaned up before I'll take a look again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this looks really nice, please fix the commit message titles and messages, ensure format changes are separate, +1 from me on doing so
fe82d2d
to
6dedf2e
Compare
Thanks a lot for your feedback, I really appreciate that! |
9014ef3
to
241bae7
Compare
Adds properties for current direction, charge and voltage alarms Signed-off-by: Philipp Steiner <[email protected]>
format fuel_gauge.h according to the clang-format settings Signed-off-by: Philipp Steiner <[email protected]>
Add driver for the Onsemi LC709203F fuel gauge Signed-off-by: Philipp Steiner <[email protected]>
Add test for the Onsemi LC709203F fuel gauge Signed-off-by: Philipp Steiner <[email protected]>
241bae7
to
5bfe438
Compare
update because of LC709203F driver was added Signed-off-by: Philipp Steiner <[email protected]>
9f8ea2a
to
3f523fe
Compare
Adds missing property values for battery connect and present state Signed-off-by: Philipp Steiner <[email protected]>
Replace IC specific fuel gauge example with a generic fuel gauge example Signed-off-by: Philipp Steiner <[email protected]>
3f523fe
to
03c4e8a
Compare
I added a PR for this issue #89301 |
I changed the commit messages, split the commits and reordered them. So far I think/hope I did this in the way as it was intended by you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for the Onsemi LC709203F fuel gauge by introducing a new driver along with the necessary device tree bindings, emulator support, Kconfig integration, and documentation updates.
- Added new LC709203F driver source files, header, and emulator implementation.
- Introduced a new device tree binding and updated board overlay files for fuel gauge selection.
- Updated CMake configurations, Kconfig, and documentation to clearly differentiate between the LC709203F and the existing MAX17048.
Reviewed Changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
samples/fuel_gauge/boards/adafruit_feather_esp32s2_B.overlay | Added LC709203F overlay with new compatible string and configuration. |
include/zephyr/drivers/fuel_gauge.h | Extended fuel gauge property enum and union to include new LC709203F properties. |
dts/bindings/fuel-gauge/onnn,lc709203f.yaml | Introduced DT binding YAML for the LC709203F. |
drivers/fuel_gauge/lc709203f/ (all files) | Added driver source, header, emulator, Kconfig, and CMake integration for LC709203F. |
drivers/fuel_gauge/Kconfig and CMakeLists.txt | Updated to integrate the new LC709203F driver. |
Boards overlays and documentation files | Revised overlays and docs to clarify support for LC709203F versus MAX17048. |
Add driver for the Onsemi LC709203F fuel gauge