From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com
Cc: Mark Rutland <mark.rutland@arm.com>,
Andrei Stefanescu <andrei.stefanescu@microchip.com>,
Heiko Stuebner <heiko@sntech.de>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Linus Walleij <linus.walleij@linaro.org>,
Brendan Higgins <brendanhiggins@google.com>,
Sebastian Reichel <sre@kernel.org>,
Andreas Kemnade <andreas@kemnade.info>,
"Angelo G. Del Regno" <kholk11@gmail.com>,
Hsin-Hsiung Wang <hsin-hsiung.wang@mediatek.com>,
linux-samsung-soc@vger.kernel.org,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Axel Lin <axel.lin@ingics.com>,
Gregory CLEMENT <gregory.clement@bootlin.com>,
linux-pm@vger.kernel.org, Krzysztof Kozlowski <krzk@kernel.org>,
Markus Reichl <m.reichl@fivetechno.de>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Chen-Yu Tsai <wens@csie.org>, Andy Gross <agross@kernel.org>,
markus.laine@fi.rohmeurope.com,
Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
devicetree@vger.kernel.org,
Charles Keepax <ckeepax@opensource.cirrus.com>,
linux-omap@vger.kernel.org,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
linux-arm-msm@vger.kernel.org,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Mark Brown <broonie@kernel.org>,
linux-mediatek@lists.infradead.org,
Matthias Brugger <matthias.bgg@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
linux-arm-kernel@lists.infradead.org,
Support Opensource <support.opensource@diasemi.com>,
Baolin Wang <baolin.wang@linaro.org>,
Sangbeom Kim <sbkim73@samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com,
Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
patches@opensource.cirrus.com
Subject: [PATCH v8 00/10] Support ROHM BD99954 charger IC
Date: Fri, 3 Apr 2020 11:36:17 +0300 [thread overview]
Message-ID: <cover.1585902279.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 extracts a "linear ranges" helper out of the regulator
framework. Linear ranges helper is intended to help converting
real-world values to register values when conversion is linear. I
suspect this is useful also for power subsystem and possibly for clk.
Current implementation does not support inversely proportional ranges
but adding support for that could be helpful.
This version of series introduces new battry DT binding entries and
adds the parsing in power_supply_get_battery_info().
Changelog v8:
Linear ranges
- small improvements suggested by Andy Shevchenko, no functional changes
Changelog v7:
General:
- rebased on top of v5.6
bd99954 driver:
- fixed bunch of styling issues spotted by Andy Shevchenko
- dropped ACPI table as ACPI properties are not supported at this
version of driver.
- added few acks
Changelog v6:
generic:
- rebased on top of 5.6-rc7.
linear ranges:
- moved to lib as requested by Greg KH
- EXPORT_SYMBOL => EXPORT_SYMBOL_GPL
- licence GPL-2.0, not later
- added KUnit test for linear ranges
Changelog v5:
generic:
- rebased on top of 5.6-rc6.
DT-bindings:
- Dropped -charger extension from compatible and removed wildcard x.
regulators:
- squashed the regulator changes in one patch.
power-supply KConfig:
- fixed indentiation
- dropped unnecessary 'default N' from BD99954.
Changelog v4:
generic:
- rebase and drop RFC.
DT-bindings:
- add I2C node address-cells and size-cells to fix yaml check errors
- uncomment multipleOf:
bd70528:
- add patch which renames driver internal linear_range struct to
avoid collision when regulator/driver.h (which gets included from
rohm generic header) introduces the linear_range struct.
regulators:
- rebase to v5.6-rc2 and convert also the two newly introduced
drivers to use linear_range struct instead of
regulator_linear_range.
linear_ranges:
- Fix kerneldoc.
Changelog RFC-v3:
DT-bindings:
- fix the BD99954 binding (the *-microvolt Vs. *-microvolts issue is
still there. Not sure which one is correct)
- renabe tricklecharge-* binding to trickle-charge-* as suggested by
Rob.
- drop the linear-ranges helper which was written for BD70528 and
extract the linear-range code from regulator framework instead.
- refactor regulator framework to utilize extracted linear-ranges
code.
- change the struct regulator_linear_range to linear_range from
regulator drivers.
- refactor BD70528 to use regulator framework originated
linear-ranges code.
- change BD99954 to use linear-ranges code from regulator framework
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:
Test for linear ranges helpers
Patch 5:
Rename driver internal struct linear_range from bd70528-power
Patch 6:
Use linear-ranges helpers in regulator framework and
convert regulator drivers to use new linear_range struct.
Patch 7:
Use linear-ranges helpers in bd70528 driver
Patch 8:
Parsing of new battery parameters
Patch 9:
ROHM BD99954 charger IC driver
Patch 10:
Fix Kconfig help text indentiation for other entries as well.
---
Matti Vaittinen (10):
dt-bindings: battery: add new battery parameters
dt_bindings: ROHM BD99954 Charger
lib: add linear ranges helpers
lib/test_linear_ranges: add a test for the 'linear_ranges'
power: supply: bd70528: rename linear_range to avoid collision
regulator: use linear_ranges helper
power: supply: bd70528: use linear ranges
power: supply: add battery parameters
power: supply: Support ROHM bd99954 charger
power: supply: Fix Kconfig help text indentiation
.../bindings/power/supply/battery.txt | 6 +
.../bindings/power/supply/rohm,bd99954.yaml | 155 +++
drivers/power/supply/Kconfig | 34 +-
drivers/power/supply/Makefile | 1 +
drivers/power/supply/bd70528-charger.c | 140 +-
drivers/power/supply/bd99954-charger.c | 1149 +++++++++++++++++
drivers/power/supply/power_supply_core.c | 8 +
drivers/regulator/88pg86x.c | 4 +-
drivers/regulator/88pm800-regulator.c | 4 +-
drivers/regulator/Kconfig | 1 +
drivers/regulator/act8865-regulator.c | 4 +-
drivers/regulator/act8945a-regulator.c | 2 +-
drivers/regulator/arizona-ldo1.c | 2 +-
drivers/regulator/arizona-micsupp.c | 4 +-
drivers/regulator/as3711-regulator.c | 6 +-
drivers/regulator/as3722-regulator.c | 4 +-
drivers/regulator/axp20x-regulator.c | 16 +-
drivers/regulator/bcm590xx-regulator.c | 8 +-
drivers/regulator/bd70528-regulator.c | 8 +-
drivers/regulator/bd71828-regulator.c | 10 +-
drivers/regulator/bd718x7-regulator.c | 26 +-
drivers/regulator/da903x.c | 2 +-
drivers/regulator/helpers.c | 130 +-
drivers/regulator/hi6421-regulator.c | 4 +-
drivers/regulator/lochnagar-regulator.c | 4 +-
drivers/regulator/lp873x-regulator.c | 4 +-
drivers/regulator/lp87565-regulator.c | 2 +-
drivers/regulator/lp8788-buck.c | 2 +-
drivers/regulator/max77650-regulator.c | 2 +-
drivers/regulator/mcp16502.c | 4 +-
drivers/regulator/mp8859.c | 2 +-
drivers/regulator/mt6323-regulator.c | 6 +-
drivers/regulator/mt6358-regulator.c | 8 +-
drivers/regulator/mt6380-regulator.c | 6 +-
drivers/regulator/mt6397-regulator.c | 6 +-
drivers/regulator/palmas-regulator.c | 4 +-
drivers/regulator/qcom-rpmh-regulator.c | 2 +-
drivers/regulator/qcom_rpm-regulator.c | 14 +-
drivers/regulator/qcom_smd-regulator.c | 70 +-
drivers/regulator/rk808-regulator.c | 10 +-
drivers/regulator/s2mps11.c | 14 +-
drivers/regulator/sky81452-regulator.c | 2 +-
drivers/regulator/stpmic1_regulator.c | 18 +-
drivers/regulator/tps65086-regulator.c | 10 +-
drivers/regulator/tps65217-regulator.c | 4 +-
drivers/regulator/tps65218-regulator.c | 6 +-
drivers/regulator/tps65912-regulator.c | 4 +-
drivers/regulator/twl-regulator.c | 4 +-
drivers/regulator/twl6030-regulator.c | 2 +-
drivers/regulator/wm831x-dcdc.c | 2 +-
drivers/regulator/wm831x-ldo.c | 4 +-
drivers/regulator/wm8350-regulator.c | 2 +-
drivers/regulator/wm8400-regulator.c | 2 +-
include/linux/linear_range.h | 48 +
include/linux/power/bd99954-charger.h | 1075 +++++++++++++++
include/linux/power_supply.h | 4 +
include/linux/regulator/driver.h | 27 +-
lib/Kconfig | 3 +
lib/Kconfig.debug | 11 +
lib/Makefile | 2 +
lib/linear_ranges.c | 241 ++++
lib/test_linear_ranges.c | 228 ++++
62 files changed, 3231 insertions(+), 356 deletions(-)
create mode 100644 Documentation/devicetree/bindings/power/supply/rohm,bd99954.yaml
create mode 100644 drivers/power/supply/bd99954-charger.c
create mode 100644 include/linux/linear_range.h
create mode 100644 include/linux/power/bd99954-charger.h
create mode 100644 lib/linear_ranges.c
create mode 100644 lib/test_linear_ranges.c
base-commit: 7111951b8d49 ("Linux 5.6")
--
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 =]
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next reply other threads:[~2020-04-03 8:40 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 8:36 Matti Vaittinen [this message]
2020-04-03 8:41 ` [PATCH v8 01/10] dt-bindings: battery: add new battery parameters Matti Vaittinen
2020-04-05 3:28 ` Sebastian Reichel
2020-04-03 8:45 ` [PATCH v8 02/10] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-04-05 3:30 ` Sebastian Reichel
2020-04-03 8:45 ` [PATCH v8 03/10] lib: add linear ranges helpers Matti Vaittinen
2020-04-03 9:37 ` Andy Shevchenko
2020-04-03 8:46 ` [PATCH v8 04/10] lib/test_linear_ranges: add a test for the 'linear_ranges' Matti Vaittinen
2020-04-03 8:46 ` [PATCH v8 05/10] power: supply: bd70528: rename linear_range to avoid collision Matti Vaittinen
2020-04-05 3:33 ` Sebastian Reichel
2020-04-06 9:21 ` Vaittinen, Matti
2020-04-03 8:46 ` [PATCH v8 06/10] regulator: use linear_ranges helper Matti Vaittinen
2020-04-03 8:47 ` [PATCH v8 07/10] power: supply: bd70528: use linear ranges Matti Vaittinen
2020-04-05 3:37 ` Sebastian Reichel
2020-04-03 8:47 ` [PATCH v8 08/10] power: supply: add battery parameters Matti Vaittinen
2020-04-05 3:35 ` Sebastian Reichel
2020-04-03 8:48 ` [PATCH v8 09/10] power: supply: Support ROHM bd99954 charger Matti Vaittinen
2020-04-03 9:41 ` Andy Shevchenko
2020-04-05 3:22 ` Sebastian Reichel
2020-04-06 9:59 ` Vaittinen, Matti
2020-04-03 8:48 ` [PATCH v8 10/10] power: supply: Fix Kconfig help text indentiation Matti Vaittinen
2020-04-05 3:35 ` Sebastian Reichel
2020-04-03 10:07 ` [PATCH v8 00/10] Support ROHM BD99954 charger IC Vaittinen, Matti
2020-04-03 11:02 ` andriy.shevchenko
2020-04-03 11:13 ` Vaittinen, Matti
2020-04-03 11:50 ` andriy.shevchenko
2020-04-03 11:51 ` andriy.shevchenko
2020-04-03 12:01 ` Mark Brown
2020-04-03 12:30 ` Vaittinen, Matti
2020-04-03 12:31 ` Mark Brown
2020-04-05 3:27 ` Sebastian Reichel
2020-04-06 5:22 ` Vaittinen, Matti
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.1585902279.git.matti.vaittinen@fi.rohmeurope.com \
--to=matti.vaittinen@fi.rohmeurope.com \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=agross@kernel.org \
--cc=andreas@kemnade.info \
--cc=andrei.stefanescu@microchip.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=axel.lin@ingics.com \
--cc=b.zolnierkie@samsung.com \
--cc=baolin.wang@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=bjorn.andersson@linaro.org \
--cc=brendanhiggins@google.com \
--cc=broonie@kernel.org \
--cc=ckeepax@opensource.cirrus.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.clement@bootlin.com \
--cc=heiko@sntech.de \
--cc=hsin-hsiung.wang@mediatek.com \
--cc=kholk11@gmail.com \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.reichl@fivetechno.de \
--cc=mark.rutland@arm.com \
--cc=markus.laine@fi.rohmeurope.com \
--cc=matthias.bgg@gmail.com \
--cc=mazziesaccount@gmail.com \
--cc=mikko.mutanen@fi.rohmeurope.com \
--cc=patches@opensource.cirrus.com \
--cc=rafael@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rf@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
--cc=sbkim73@samsung.com \
--cc=sre@kernel.org \
--cc=support.opensource@diasemi.com \
--cc=tglx@linutronix.de \
--cc=tony@atomide.com \
--cc=vkoul@kernel.org \
--cc=wens@csie.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).