linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] add support for AXP813 ADC and battery power supply
@ 2017-12-04 14:12 Quentin Schulz
  2017-12-04 14:12 ` [PATCH 1/8] iio: adc: axp20x_adc: put ADC rate setting in a per-variant function Quentin Schulz
                   ` (7 more replies)
  0 siblings, 8 replies; 26+ messages in thread
From: Quentin Schulz @ 2017-12-04 14:12 UTC (permalink / raw)
  To: sre, robh+dt, mark.rutland, wens, linux, maxime.ripard, jic23, lee.jones
  Cc: knaack.h, lars, pmeerw, linux-pm, devicetree, linux-kernel,
	linux-arm-kernel, linux-iio, icenowy, linux-sunxi,
	thomas.petazzoni, Quentin Schulz

The AXP813 PMIC is relatively close to the already supported AXP20X and
AXP22X. It provides three different power outputs: battery, AC and USB, and
measures a few different things: temperature, power supply status, current
current and voltage supplied, maximum current limit, battery capacity, min
and max voltage limits.

One of its two GPIOs can be used as an ADC.

There are a few differences with AXP20X/AXP22X PMICs though:
  - a different constant charge current formula,
  - battery temperature, GPIO0 and battery voltages are the only voltages
  measurable,
  - all data are stored on 12 bits (AXP20X/AXP22X had one type of data that
  was stored on 13 bits),
  - different scales and offsets,
  - a different ADC rate formula and register,

This patch series adds support for the PMIC's ADC and battery power supply
in the existing drivers.

Make the axp20x MFD automatically probe the ADC driver, add the battery
power supply node in axp81x node and enable it for the TBS A711 since it
has a soldered battery.

Q: The BananaPi M3 has two solder balls for battery, should the battery
power supply node be enabled for this board as well?

Thanks,
Quentin

Quentin Schulz (8):
  iio: adc: axp20x_adc: put ADC rate setting in a per-variant function
  iio: adc: axp20x_adc: add support for AXP813 ADC
  mfd: axp20x: probe axp20x_adc driver for AXP813
  dt-bindings: power: supply: axp20x: add AXP813 battery DT binding
  power: supply: axp20x_battery: add support for AXP813
  mfd: axp20x: add battery power supply cell for AXP813
  ARM: dtsi: axp81x: add battery power supply subnode
  ARM: dtsi: sun8i: a711: enable battery power supply subnode

 Documentation/devicetree/bindings/power/supply/axp20x_battery.txt |   8 ++--
 arch/arm/boot/dts/axp81x.dtsi                                     |   5 +++-
 arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts                         |   4 ++-
 drivers/iio/adc/axp20x_adc.c                                      | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 drivers/mfd/axp20x.c                                              |   7 +++-
 drivers/power/supply/axp20x_battery.c                             |  44 ++++++++++++++++++++++-
 include/linux/mfd/axp20x.h                                        |   2 +-
 7 files changed, 196 insertions(+), 13 deletions(-)

base-commit: 7cc61a0a562c7005d2a34f97e94cf26689a2f57c
-- 
git-series 0.9.1

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

end of thread, other threads:[~2017-12-12 19:55 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-04 14:12 [PATCH 0/8] add support for AXP813 ADC and battery power supply Quentin Schulz
2017-12-04 14:12 ` [PATCH 1/8] iio: adc: axp20x_adc: put ADC rate setting in a per-variant function Quentin Schulz
2017-12-05  3:35   ` [linux-sunxi] " Chen-Yu Tsai
2017-12-10 16:37     ` Jonathan Cameron
2017-12-04 14:12 ` [PATCH 2/8] iio: adc: axp20x_adc: add support for AXP813 ADC Quentin Schulz
2017-12-10 16:36   ` Jonathan Cameron
2017-12-11  8:18     ` Quentin Schulz
2017-12-12 15:12       ` Jonathan Cameron
2017-12-04 14:12 ` [PATCH 3/8] mfd: axp20x: probe axp20x_adc driver for AXP813 Quentin Schulz
2017-12-05  8:08   ` Maxime Ripard
2017-12-07  8:51     ` Quentin Schulz
2017-12-07  8:54       ` Chen-Yu Tsai
2017-12-07  9:03         ` Quentin Schulz
2017-12-07  9:14           ` Chen-Yu Tsai
2017-12-10 16:40             ` Jonathan Cameron
2017-12-04 14:12 ` [PATCH 4/8] dt-bindings: power: supply: axp20x: add AXP813 battery DT binding Quentin Schulz
2017-12-06 21:16   ` Rob Herring
2017-12-10 16:44   ` Jonathan Cameron
2017-12-04 14:12 ` [PATCH 5/8] power: supply: axp20x_battery: add support for AXP813 Quentin Schulz
2017-12-10 16:49   ` Jonathan Cameron
2017-12-11  8:35     ` Quentin Schulz
2017-12-12 19:55       ` Jonathan Cameron
2017-12-04 14:12 ` [PATCH 6/8] mfd: axp20x: add battery power supply cell " Quentin Schulz
2017-12-05  8:24   ` Lee Jones
2017-12-04 14:12 ` [PATCH 7/8] ARM: dtsi: axp81x: add battery power supply subnode Quentin Schulz
2017-12-04 14:12 ` [PATCH 8/8] ARM: dtsi: sun8i: a711: enable " Quentin Schulz

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