All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH v3 0/8] Support ROHM BD99954 charger IC
@ 2020-02-20  7:33 ` Matti Vaittinen
  0 siblings, 0 replies; 25+ messages in thread
From: Matti Vaittinen @ 2020-02-20  7:33 UTC (permalink / raw)
  To: matti.vaittinen, mazziesaccount
  Cc: Sebastian Reichel, Rob Herring, Mark Rutland, Greg Kroah-Hartman,
	Rafael J. Wysocki, Liam Girdwood, Mark Brown, Chen-Yu Tsai,
	Support Opensource, Charles Keepax, Richard Fitzgerald, Milo Kim,
	Bartosz Golaszewski, Andrei Stefanescu, Matthias Brugger,
	Tony Lindgren, Andy Gross, Bjorn Andersson, Sangbeom Kim,
	Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz, Matti Vaittinen,
	linux-pm, devicetree, linux-kernel, patches, linux-arm-kernel,
	linux-mediatek, linux-omap, linux-arm-msm, linux-samsung-soc,
	Markus Laine, Mikko Mutanen

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 usefull also for power subsystem and possibly for clk.

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-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:
	Rename struct regulator_linear_range to struct linear_range and
	convert regulator drivers to use renamed struct
Patch 5:
	Use linear-ranges helpers in regulator framework
Patch 6:
	Use linear-ranges helpers in bd70528 driver
Patch 7:
	Parsing of new battery parameters
Patch 8:
	ROHM BD99954 charger IC driver

---

Matti Vaittinen (8):
  dt-bindings: battry: add new battery parameters
  dt_bindings: ROHM BD99954 Charger
  drivers: base: add linear ranges helpers
  regulator: rename regulator_linear_range to linear_range
  regulator: use linear_ranges helper
  power: supply: bd70528: use linear ranges
  power: supply: add battery parameters
  power: supply: Support ROHM bd99954 charger

 .../bindings/power/supply/battery.txt         |    6 +
 .../bindings/power/supply/rohm,bd9995x.yaml   |  153 +++
 drivers/base/Kconfig                          |    3 +
 drivers/base/Makefile                         |    1 +
 drivers/base/linear_ranges.c                  |  246 ++++
 drivers/power/supply/Kconfig                  |   11 +
 drivers/power/supply/Makefile                 |    1 +
 drivers/power/supply/bd70528-charger.c        |  142 +-
 drivers/power/supply/bd99954-charger.c        | 1171 +++++++++++++++++
 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/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/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 +-
 58 files changed, 3000 insertions(+), 339 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/supply/rohm,bd9995x.yaml
 create mode 100644 drivers/base/linear_ranges.c
 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


base-commit def9d2780727 ("Linux 5.5-rc7")
-- 
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 =] 

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

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

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20  7:33 [RFC PATCH v3 0/8] Support ROHM BD99954 charger IC Matti Vaittinen
2020-02-20  7:33 ` Matti Vaittinen
2020-02-20  7:33 ` Matti Vaittinen
2020-02-20  7:34 ` [RFC PATCH v3 1/8] dt-bindings: battry: add new battery parameters Matti Vaittinen
2020-02-20  7:35 ` [RFC PATCH v3 2/8] dt_bindings: ROHM BD99954 Charger Matti Vaittinen
2020-02-20 20:34   ` Rob Herring
2020-02-20  7:35 ` [RFC PATCH v3 3/8] drivers: base: add linear ranges helpers Matti Vaittinen
2020-02-20  7:47   ` Randy Dunlap
2020-02-20  8:34     ` Vaittinen, Matti
2020-02-20  7:36 ` [RFC PATCH v3 4/8] regulator: rename regulator_linear_range to linear_range Matti Vaittinen
2020-02-20  7:36   ` Matti Vaittinen
2020-02-20  7:36   ` Matti Vaittinen
2020-02-24 11:53   ` Mark Brown
2020-02-24 11:53     ` Mark Brown
2020-02-24 11:53     ` Mark Brown
2020-02-24 12:20     ` Vaittinen, Matti
2020-02-24 12:20       ` Vaittinen, Matti
2020-02-24 12:20       ` Vaittinen, Matti
2020-02-20  7:36 ` [RFC PATCH v3 5/8] regulator: use linear_ranges helper Matti Vaittinen
2020-02-24 11:57   ` Mark Brown
2020-02-25  6:23     ` Vaittinen, Matti
2020-02-25 15:33       ` Mark Brown
2020-03-03  8:04         ` Vaittinen, Matti
2020-02-20  7:37 ` [RFC PATCH v3 6/8] power: supply: bd70528: use linear ranges Matti Vaittinen
2020-02-20  7:37 ` [RFC PATCH v3 7/8] power: supply: add battery parameters Matti Vaittinen

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.