[PATCH v2 0/2] Add support for CellWise cw2015 fuel gauge

From: Tobias Schramm
Date: Mon Mar 09 2020 - 12:04:24 EST


This patchset adds support for the CellWise cw2015 fuel gauge.

The CellWise cw2015 fuel gauge is a shuntless, single-cell Li-Ion fuel
gauge. It is used in the pine64 Pinebook Pro laptop.

This is v2 of a patchset I sent in late 2019. Took me some time to get
around to prepare a v2 but here it is.

I've kept the cellwise,bat-config-info property in the device tree. Its
content describes characteristics of the battery built into a device. The
exact format is unknown and not publicly documented. It is likely composed
of some key parameters of the battery (chemistry, voltages,
design capacity) and parameters for tuning the internal state of charge
approximation function.

In general I'm not 100 % sure about my json-schema binding for the gauge.
It is my first time ever writing a json-schema binding and I'm not sure
whether properties like power-supplies or monitored-battery need to be
added to a separate, common schema for power supplies or not.


Best regards,

Tobias Schramm

Changelog:
v2:
* Change subject to "Add support for CellWise cw2015 fuel gauge"
* Rewrite bindings as json-schema
* Use default power-supplies handling
* Use regmap for register access
* Use standard simple-battery node
* Replace printk/pr_* by dev_{dbg,info,warn,err}
* Use cancel_delayed_work_sync in remove
* General code cleanup

Tobias Schramm (2):
dt-bindings: power: supply: cw2015_battery: add device tree binding
documentation
power: supply: add CellWise cw2015 fuel gauge driver

.../bindings/power/supply/cw2015_battery.yaml | 84 ++
MAINTAINERS | 6 +
drivers/power/supply/Kconfig | 6 +
drivers/power/supply/Makefile | 1 +
drivers/power/supply/cw2015_battery.c | 891 ++++++++++++++++++
5 files changed, 988 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml
create mode 100644 drivers/power/supply/cw2015_battery.c

--
2.24.1