devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] set battery info on AXP20X and AXP22X from DT
@ 2017-05-11 13:42 Quentin Schulz
       [not found] ` <20170511134221.5569-1-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Quentin Schulz @ 2017-05-11 13:42 UTC (permalink / raw)
  To: sre-DgEjT+Ai2ygdnm+yROfE0A, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	mark.rutland-5wv7dgnIgG8, wens-jdAy2FN1RRM
  Cc: Quentin Schulz, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	liam-RYWXG+zxWwBdeoIcmNTgJF6hYfS7NtTn,
	thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw

X-Powers AXP20X and AXP22X are capable of setting battery constant
charge current to limit the current supplied to the battery. The battery
driver already offers the ability to modify the constant charge current
via sysfs but the driver will probe with the default value of 1500mA.

They are also able to tell the system when to shut down due to the
supplied power being too low. This patch series adds the ability to set
this power threshold from the battery DT node.

The constant charge current is critical for batteries as if it is higher
than the supported constant charge current, it might
severly/irreversibly damages or kills the battery.

This patch series aims at offering the ability to set the maximal
supported constant charge current from Device Tree which will be used at
driver probing to set the default constant charge current, thus making
sure we stay out of the unsupported range as little time as possible
(the default constant current charge will still be 1500mA from powering
up the board to the driver probing unless the bootloader takes care of
it beforehand).

We still offer the user the ability to change the maximal constant
charge current from sysfs for those who would like to switch the battery
attached to their board, so they can set an appropriate constant current
charge and take advantage of higher constant current charge.

Quentin

Quentin Schulz (4):
  power: supply: axp20x_battery: add support for DT battery
  dt-bindings: power: battery: add constant-charge-current-max-microamp
    property
  power: supply: power_supply_core: add constant-charge-current optional
    property
  power: supply: axp20x_battery: add DT support for battery max constant
    charge current

 .../devicetree/bindings/power/supply/battery.txt   |  2 +
 drivers/power/supply/axp20x_battery.c              | 88 ++++++++++++++++++++--
 drivers/power/supply/power_supply_core.c           |  3 +
 include/linux/power_supply.h                       |  1 +
 4 files changed, 86 insertions(+), 8 deletions(-)

-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2017-06-08 15:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-11 13:42 [PATCH 0/4] set battery info on AXP20X and AXP22X from DT Quentin Schulz
     [not found] ` <20170511134221.5569-1-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-11 13:42   ` [PATCH 1/4] power: supply: axp20x_battery: add support for DT battery Quentin Schulz
     [not found]     ` <20170511134221.5569-2-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-16  5:18       ` Chen-Yu Tsai
     [not found]         ` <CAGb2v6598dSC278vVdQ_f54piLS0y4BnN3V4ZUhbGXKavx+ryQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-05-16  6:33           ` Quentin Schulz
2017-06-08 15:58       ` Sebastian Reichel
2017-05-11 13:42   ` [PATCH 2/4] dt-bindings: power: battery: add constant-charge-current-max-microamp property Quentin Schulz
     [not found]     ` <20170511134221.5569-3-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-15 20:14       ` Rob Herring
2017-05-11 13:42   ` [PATCH 3/4] power: supply: power_supply_core: add constant-charge-current optional property Quentin Schulz
2017-05-11 13:42   ` [PATCH 4/4] power: supply: axp20x_battery: add DT support for battery max constant charge current Quentin Schulz
     [not found]     ` <20170511134221.5569-5-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-06-08 15:58       ` Sebastian Reichel

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).