Skip to content

Conversation

@DBS06
Copy link
Contributor

@DBS06 DBS06 commented Apr 24, 2025

Add driver for the Onsemi LC709203F fuel gauge

Copy link

Copilot AI left a 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

@DBS06 DBS06 force-pushed the add_LC709203F_fuel_gauge_driver branch from b168287 to aedd521 Compare April 24, 2025 06:33
Copy link
Contributor

@kartben kartben left a comment

Choose a reason for hiding this comment

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

Some early feedback

Copy link
Contributor

@kartben kartben left a 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)

@DBS06
Copy link
Contributor Author

DBS06 commented Apr 24, 2025

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

@DBS06
Copy link
Contributor Author

DBS06 commented Apr 24, 2025

Some early feedback

Thanks a lot for this fast reply!

@DBS06 DBS06 force-pushed the add_LC709203F_fuel_gauge_driver branch 3 times, most recently from b1096dd to 7569d0a Compare April 24, 2025 12:17
@DBS06
Copy link
Contributor Author

DBS06 commented Apr 24, 2025

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 split up the commit into multiple commits in a way which I think makes sense

@DBS06
Copy link
Contributor Author

DBS06 commented Apr 24, 2025

overview which is still missing or needs/should/wished to be changed

  • Made changes suggested by Copilot Review
  • Made changes suggested by kartbens early Review
  • Change CRC calculation to Zephyr CRC
  • Add explanation for dts/bindings default values
  • Split up the commits
  • Add most basic fuelgauge sample
  • Adapt Docu for Adafruit_ESP32S2_feather boards
  • Extend fuelgauge sample as discussed here: drivers: fuelgauge: Add Onsemi LC709203F driver #89000 (comment)

@DBS06 DBS06 force-pushed the add_LC709203F_fuel_gauge_driver branch 10 times, most recently from ddebd24 to d9af45c Compare April 29, 2025 09:57
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
E Reliability Rating on New Code (required ≥ C)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@DBS06
Copy link
Contributor Author

DBS06 commented May 22, 2025

I messed up the commits due to GitHub's merge conflict solver, therefore I will close this PR and recreate the PR see #90310

@DBS06 DBS06 deleted the add_LC709203F_fuel_gauge_driver branch July 31, 2025 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment