zephyr,native-linux-fuel-gauge

Description

Native Linux fuel gauge

Fuel gauge that reads the sysfs attributes of a Linux power_supply device
of the host (e.g. /sys/class/power_supply/BAT0). The device must be of the
Battery type.

Examples

/ {
    fuel_gauge: fuel_gauge {
      compatible = "zephyr,native-linux-fuel-gauge";

      path = "/sys/class/power_supply/BAT0";
    };
};

Properties

Properties not inherited from the base binding file.

Name

Type

Details

path

string

Directory of the host power supply, e.g. "/sys/class/power_supply/BAT0".
The name of the battery depends on the host, set it as needed before
enabling the node. A directory holding the attribute files of a fake
power supply serves on a host without a battery. The --fuel-gauge-path
command line option overrides this property.

This property is required.