linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com
Cc: mikko.mutanen@fi.rohmeurope.com, markus.laine@fi.rohmeurope.com,
	Linus Walleij <linus.walleij@linaro.org>,
	Mark Brown <broonie@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [RFC PATCH v2 0/5] Support ROHM BD99954 charger IC
Date: Fri, 14 Feb 2020 09:29:05 +0200	[thread overview]
Message-ID: <cover.1581597365.git.matti.vaittinen@fi.rohmeurope.com> (raw)

Support ROHM BD99954 Battery Management IC

ROHM BD99954 is a Battery Management IC for 1-4 cell Lithium-Ion
secondary battery. BD99954 is intended to be used in space-constraint
equipment such as Low profile Notebook PC, Tablets and other
applications.

Series introduces "linear ranges" helper intended to help converting
real-world values to register values when conversion is linear. This
version just meld the helpers in power/supply. Idea is stolen from
regulator framework's linear-ranges handling.

This version of series introduces new battry DT binding entries and
adds the parsing in power_supply_get_battery_info(). These properties
can be converted to ROHM specific properties and parsing can be moved
to the BD99954 driver if this does not seem like a right thing to do.
I just have a feeling the the BD99954 is not the only charger which
could utilize these.

We also add ROHM specific charger parameters for limiting the input
current(s). I think these parameters are pretty common and maybe the
"rohm,"-prefix should be dropped and we should try having common
input limiting properties for different chips?

Series is based on v5.5-rc7

Changelog RFC-v2:
 DT-bindings:
   - Used the battery parameters described in battery.txt
   - Added few new parameters to battery.txt
   - Added ASCII art charging profile chart for BD99954 to explain
     states and limits.
 Linear ranges:
   - Fixed division by zero error from linear-ranges code if step 0 is
     used.
 Power-supply core:
   - Added parsing of new battery parameters.
 BD99954 driver:
   - converted to use battery parameters from battery node
   - Added step 0 ranges for reg values which do not change voltage
   - added dt-node to psy-config

Patch 1:
	DT binding docs for the new battery parameters
Patch 2:
	BD99954 charger DT binding docs
Patch 3:
	Linear ranges helpers
Patch 4:
	Parsing of new battery parameters
Patch 5:
	BD99954 driver

---

Matti Vaittinen (5):
  dt-bindings: battry: add new battery parameters
  dt_bindings: ROHM BD99954 Charger
  power: Add linear_range helper
  power: supply: add battery parameters
  power: supply: Support ROHM bd99954 charger

 .../bindings/power/supply/battery.txt         |    6 +
 .../bindings/power/supply/rohm,bd9995x.yaml   |  167 +++
 drivers/power/supply/Kconfig                  |   14 +
 drivers/power/supply/Makefile                 |    2 +
 drivers/power/supply/bd70528-charger.c        |   65 +-
 drivers/power/supply/bd99954-charger.c        | 1140 +++++++++++++++++
 drivers/power/supply/linear-ranges.h          |   36 +
 drivers/power/supply/linear_ranges.c          |   92 ++
 drivers/power/supply/power_supply_core.c      |    8 +
 include/linux/power/bd99954-charger.h         | 1075 ++++++++++++++++
 include/linux/power_supply.h                  |    4 +
 11 files changed, 2552 insertions(+), 57 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/supply/rohm,bd9995x.yaml
 create mode 100644 drivers/power/supply/bd99954-charger.c
 create mode 100644 drivers/power/supply/linear-ranges.h
 create mode 100644 drivers/power/supply/linear_ranges.c
 create mode 100644 include/linux/power/bd99954-charger.h

-- 
2.21.0


-- 
Matti Vaittinen, Linux device drivers
ROHM Semiconductors, Finland SWDC
Kiviharjunlenkki 1E
90220 OULU
FINLAND

~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~
Simon says - in Latin please.
~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~
Thanks to Simon Glass for the translation =] 

             reply	other threads:[~2020-02-14  7:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-14  7:29 Matti Vaittinen [this message]
2020-02-14  7:30 ` [RFC PATCH v2 1/5] dt-bindings: battry: add new battery parameters Matti Vaittinen
2020-02-19 19:57   ` Rob Herring
2020-02-20  6:39     ` Vaittinen, Matti
2020-02-14  7:36 ` [RFC PATCH v2 2/5] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-02-18 20:21   ` Rob Herring
2020-02-19  8:05     ` Vaittinen, Matti
2020-02-20 20:18       ` Rob Herring
2020-02-21  8:52         ` Vaittinen, Matti
2020-02-14  7:37 ` [RFC PATCH v2 3/5] power: Add linear_range helper Matti Vaittinen
2020-02-21 13:49   ` Linus Walleij
2020-02-22  8:33     ` Vaittinen, Matti
2020-02-14  7:38 ` [RFC PATCH v2 4/5] power: supply: add battery parameters Matti Vaittinen
2020-02-21 13:50   ` Linus Walleij
2020-02-14  7:39 ` [RFC PATCH v2 5/5] power: supply: Support ROHM bd99954 charger Matti Vaittinen

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=cover.1581597365.git.matti.vaittinen@fi.rohmeurope.com \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=markus.laine@fi.rohmeurope.com \
    --cc=mazziesaccount@gmail.com \
    --cc=mikko.mutanen@fi.rohmeurope.com \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).