Commit f059b46e authored by Hans de Goede's avatar Hans de Goede Committed by Sebastian Reichel

power: supply: ug3105_battery: Add driver for uPI uG3105 battery monitor

Add a new battery driver for the uPI uG3105 battery monitor.

Note the uG3105 is not a full-featured autonomous fuel-gauge. Instead it
is expected to be use in combination with some always on microcontroller
reading its coulomb-counter before it can wrap (must be read every 400
seconds!).

Since Linux does not monitor coulomb-counter changes while the device is
off or suspended, the coulomb counter is not used atm.

So far this driver is only used on x86/ACPI (non devicetree) devs
(also note there is no of_match table). Therefor there is no devicetree
bindings documentation for this driver's "upisemi,rsns-microohm" property
since this is not used in actual devicetree files and the dt bindings
maintainers have requested properties with no actual dt users to
_not_ be added to the dt bindings.

The property's name has been chosen so that it should not need to be
changed if/when devicetree enumeration support gets added later, as it
mirrors "maxim,rsns-microohm" from the "maxim,max17042" bindings.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 4e456230
......@@ -866,4 +866,19 @@ config CHARGER_SURFACE
Microsoft Surface devices, i.e. Surface Pro 7, Surface Laptop 3,
Surface Book 3, and Surface Laptop Go.
config BATTERY_UG3105
tristate "uPI uG3105 battery monitor driver"
depends on I2C
help
Battery monitor driver for the uPI uG3105 battery monitor.
Note the uG3105 is not a full-featured autonomous fuel-gauge. Instead
it is expected to be use in combination with some always on
microcontroller reading its coulomb-counter before it can wrap
(it must be read every 400 seconds!).
Since Linux does not monitor coulomb-counter changes while the
device is off or suspended, the functionality of this driver is
limited to reporting capacity only.
endif # POWER_SUPPLY
......@@ -105,3 +105,4 @@ obj-$(CONFIG_RN5T618_POWER) += rn5t618_power.o
obj-$(CONFIG_BATTERY_ACER_A500) += acer_a500_battery.o
obj-$(CONFIG_BATTERY_SURFACE) += surface_battery.o
obj-$(CONFIG_CHARGER_SURFACE) += surface_charger.o
obj-$(CONFIG_BATTERY_UG3105) += ug3105_battery.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment