All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add support for CellWise cw2015 fuel gauge
@ 2020-03-09 16:03 Tobias Schramm
  2020-03-09 16:03 ` [PATCH v2 1/2] dt-bindings: power: supply: cw2015_battery: add device tree binding documentation Tobias Schramm
  2020-03-09 16:03 ` [PATCH v2 2/2] power: supply: add CellWise cw2015 fuel gauge driver Tobias Schramm
  0 siblings, 2 replies; 10+ messages in thread
From: Tobias Schramm @ 2020-03-09 16:03 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Mark Rutland
  Cc: Mauro Carvalho Chehab, David S. Miller, Greg Kroah-Hartman,
	Jonathan Cameron, Andy Shevchenko, linux-pm, devicetree,
	linux-kernel, Tobias Schramm

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-11  9:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-09 16:03 [PATCH v2 0/2] Add support for CellWise cw2015 fuel gauge Tobias Schramm
2020-03-09 16:03 ` [PATCH v2 1/2] dt-bindings: power: supply: cw2015_battery: add device tree binding documentation Tobias Schramm
2020-03-10 18:34   ` Rob Herring
2020-03-10 18:34     ` Rob Herring
2020-03-09 16:03 ` [PATCH v2 2/2] power: supply: add CellWise cw2015 fuel gauge driver Tobias Schramm
2020-03-10 10:10   ` Andy Shevchenko
2020-03-10 18:55     ` Tobias Schramm
2020-03-11  8:14       ` Andy Shevchenko
2020-03-11  8:48         ` Tobias Schramm
2020-03-11  9:11           ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.