Skip to content

drivers: fuel_guage: Add support for Analog Devices LTC2959 #90356

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions drivers/fuel_gauge/ltc2959/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zephyr_library()
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
zephyr_library_sources(ltc2959.c)
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like the driver itself is missing.

Choose a reason for hiding this comment

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

My apologies. I was pushing the driver itself in a separate commit.

25 changes: 25 additions & 0 deletions drivers/fuel_gauge/ltc2959/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) 2025 Nathan Winslow <[email protected]>
# SPDX-License-Identifier: Apache-2.0

menu "LTC2959 Configuration"

config FUEL_GAUGE_LTC2959

depends on DT_HAS_ADI_LTC2959_ENABLED

Check warning on line 8 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:8 please, no spaces at the start of a line
bool "LTC2959 Fuel Gauge"

Check warning on line 9 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:9 please, no spaces at the start of a line
default y

Check warning on line 10 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:10 please, no spaces at the start of a line
select I2C

Check warning on line 11 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:11 please, no spaces at the start of a line
help

Check warning on line 12 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:12 please, no spaces at the start of a line
Enable the LTC2959 fuel gauge driver from Analog Devices.

Check warning on line 13 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:13 please, no spaces at the start of a line


config FUEL_GAUGE_LTC2959_RSENSE_MOHMS

depends on FUEL_GAUGE_LTC2959

Check warning on line 18 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:18 please, no spaces at the start of a line
int "Sense resistor value in milliohms"

Check warning on line 19 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:19 please, no spaces at the start of a line
default 80

Check warning on line 20 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:20 please, no spaces at the start of a line
help

Check warning on line 21 in drivers/fuel_gauge/ltc2959/Kconfig

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

LEADING_SPACE

drivers/fuel_gauge/ltc2959/Kconfig:21 please, no spaces at the start of a line
Set the value of the RSENSE resistor in milliohms.
This is used to calculate the current and charge resolution.

endmenu
Loading
Loading