LKML Archive on
help / color / mirror / Atom feed
From: Tobias Schramm <>
To: Andy Shevchenko <>,
	Sebastian Reichel <>,
	Rob Herring <>,
	Mark Rutland <>,
	Daniel Thompson <>
Cc: Maxime Ripard <>,
	Sam Ravnborg <>,
	Heiko Stuebner <>,
	Stephan Gerhold <>,
	Mark Brown <>,
	Mauro Carvalho Chehab <>,
	"David S. Miller" <>,
	Greg Kroah-Hartman <>,
	Jonathan Cameron <>,,,,
	Tobias Schramm <>
Subject: [PATCH v4 0/3] Add support for CellWise cw2015 fuel gauge
Date: Thu, 12 Mar 2020 23:24:45 +0100	[thread overview]
Message-ID: <> (raw)

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 v4 of the patchset. This version incorporates an additional review
by Andy and a small spelling fix.

I've kept the cellwise,battery-profile 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
comprised of some key parameters of the battery (chemistry, voltages,
design capacity) and parameters for tuning the internal state of charge
approximation function.
Since v2 CellWise has confirmed to me that the only way to obtain the
profile blob is to mail them batteries for testing. Thus we will need to
keep that property.

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

  * 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
  * Incorporate review by Andy
  * Add cellwise vendor prefix
  * Rename cellwise,bat-config-info property to cellwise,battery-profile
  * Remove most state of charge post-processing
  * Use fwnode interface
  * General code cleanup
  * Lots of code style fixes
  * Implement additional changes requested by Andy
  * Use fwnode inline wrappers
  * Clean up waiting for gauge
  * Minor code style fixes

Tobias Schramm (3):
  dt-bindings: Document cellwise vendor-prefix
  dt-bindings: power: supply: add cw2015_battery bindings
  power: supply: add CellWise cw2015 fuel gauge driver

 .../bindings/power/supply/cw2015_battery.yaml |  83 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 MAINTAINERS                                   |   6 +
 drivers/power/supply/Kconfig                  |   8 +
 drivers/power/supply/Makefile                 |   1 +
 drivers/power/supply/cw2015_battery.c         | 759 ++++++++++++++++++
 6 files changed, 859 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/cw2015_battery.yaml
 create mode 100644 drivers/power/supply/cw2015_battery.c


             reply	other threads:[~2020-03-12 22:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 22:24 Tobias Schramm [this message]
2020-03-12 22:24 ` [PATCH v4 1/3] dt-bindings: Document cellwise vendor-prefix Tobias Schramm
2020-03-12 22:24 ` [PATCH v4 2/3] dt-bindings: power: supply: add cw2015_battery bindings Tobias Schramm
2020-03-12 22:24 ` [PATCH v4 3/3] power: supply: add CellWise cw2015 fuel gauge driver Tobias Schramm
2020-03-13  9:11   ` Andy Shevchenko
2020-03-15 11:00     ` Tobias Schramm
2020-03-15 11:16       ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
    --subject='Re: [PATCH v4 0/3] Add support for CellWise cw2015 fuel gauge' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).