From: Quentin Schulz <quentin.schulz@free-electrons.com>
To: sre@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
wens@csie.org, linux@armlinux.org.uk,
maxime.ripard@free-electrons.com, lee.jones@linaro.org
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
thomas.petazzoni@free-electrons.com
Subject: Re: [PATCH v2 00/11] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs
Date: Mon, 12 Dec 2016 09:07:45 +0100 [thread overview]
Message-ID: <2189bf2a-b577-85d6-c54a-0440aed05411@free-electrons.com> (raw)
In-Reply-To: <20161209110419.28981-1-quentin.schulz@free-electrons.com>
Hi all,
I forgot to add a question to my cover letter so here it is:
The X-Powers AXP209 and AXP223 PMICs allow to not limit the maximal
current for the VBUS power supply.[1]
(If a Chinese-speaking person could check it's the same for the AXP221
that would be great also[2]).
In the get_property (axp20x_usb_power_get_property) of the power supply
driver, I see that we use -1 as value for "no limit". Should we use the
same (-1) value for the set_property (axp20x_usb_power_set_property) to
disable max current limit?
[1] http://dl.linux-sunxi.org/AXP/AXP209_Datasheet_v1.0en.pdf page 33,
REG 30H, BITS 0 & 1
[2]
http://dl.linux-sunxi.org/AXP/AXP221%20Datasheet%20V1.2%2020130326%20.pdf
page 33, REG 30H, BITS 0 & 1 => 不限流 is written for when the BIT(1) is
set.
Thanks,
Quentin
On 09/12/2016 12:04, Quentin Schulz wrote:
> The X-Powers AXP209 and AXP20X PMICs are able to set a limit for the
> VBUS power supply for both max current and min voltage supplied. This
> series of patch adds the possibility to set these limits from sysfs.
>
> Also, the AXP223 PMIC shares most of its behaviour with the AXP221 but
> the former can set the VBUS power supply max current to 100mA, unlike
> the latter. The AXP223 VBUS power supply driver used to probe on the
> AXP221 compatible. This series of patch introduces a new compatible for
> the AXP223 to be able to set the current max limit to 100mA.
>
> With that new compatible, boards having the AXP223 see their DT updated
> to use the VBUS power supply driver with the correct compatible.
>
> This series of patch also migrates from of_device_is_compatible function
> to the data field of of_device_id to identify the compatible used to
> probe. This improves the code readability.
>
> Mostly cosmetic changes in v2 and adding volatile and writeable regs to
> AXP20X and AXP22X MFD cells for the VBUS power supply driver.
>
> Quentin Schulz (11):
> power: supply: axp20x_usb_power: use of_device_id data field instead
> of device_is_compatible
> mfd: axp20x: add volatile and writeable reg ranges for VBUS power
> supply driver
> power: supply: axp20x_usb_power: set min voltage and max current from
> sysfs
> Documentation: DT: binding: axp20x_usb_power: add axp223 compatible
> power: supply: axp20x_usb_power: add 100mA max current limit for
> AXP223
> mfd: axp20x: add separate MFD cell for AXP223
> ARM: dtsi: add DTSI for AXP223
> ARM: dts: sun8i-a33-olinuxino: use AXP223 DTSI
> ARM: dts: sun8i-a33-sinlinx-sina33: use AXP223 DTSI
> ARM: dts: sun8i-r16-parrot: use AXP223 DTSI
> ARM: dtsi: sun8i-reference-design-tablet: use AXP223 DTSI
>
> .../bindings/power/supply/axp20x_usb_power.txt | 5 +
> arch/arm/boot/dts/axp223.dtsi | 58 +++++++++++
> arch/arm/boot/dts/sun8i-a33-olinuxino.dts | 2 +-
> arch/arm/boot/dts/sun8i-a33-sinlinx-sina33.dts | 2 +-
> arch/arm/boot/dts/sun8i-r16-parrot.dts | 2 +-
> .../boot/dts/sun8i-reference-design-tablet.dtsi | 2 +-
> drivers/mfd/axp20x.c | 32 +++++-
> drivers/power/supply/axp20x_usb_power.c | 116 ++++++++++++++++++---
> 8 files changed, 197 insertions(+), 22 deletions(-)
> create mode 100644 arch/arm/boot/dts/axp223.dtsi
>
--
Quentin Schulz, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
next prev parent reply other threads:[~2016-12-12 8:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 11:04 [PATCH v2 00/11] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 01/11] power: supply: axp20x_usb_power: use of_device_id data field instead of device_is_compatible Quentin Schulz
2016-12-14 15:38 ` Chen-Yu Tsai
2016-12-09 11:04 ` [PATCH v2 02/11] mfd: axp20x: add volatile and writeable reg ranges for VBUS power supply driver Quentin Schulz
[not found] ` <20161209110419.28981-3-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-12-14 15:43 ` Chen-Yu Tsai
2016-12-19 12:28 ` Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 03/11] power: supply: axp20x_usb_power: set min voltage and max current from sysfs Quentin Schulz
[not found] ` <20161209110419.28981-4-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-12-14 15:45 ` Chen-Yu Tsai
2016-12-09 11:04 ` [PATCH v2 04/11] Documentation: DT: binding: axp20x_usb_power: add axp223 compatible Quentin Schulz
2016-12-12 15:51 ` Maxime Ripard
[not found] ` <20161209110419.28981-5-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-12-12 18:44 ` Rob Herring
2016-12-14 16:12 ` Chen-Yu Tsai
2016-12-09 11:04 ` [PATCH v2 05/11] power: supply: axp20x_usb_power: add 100mA max current limit for AXP223 Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 06/11] mfd: axp20x: add separate MFD cell " Quentin Schulz
2016-12-12 15:51 ` Maxime Ripard
2017-01-04 9:45 ` Lee Jones
2016-12-09 11:04 ` [PATCH v2 07/11] ARM: dtsi: add DTSI " Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 08/11] ARM: dts: sun8i-a33-olinuxino: use AXP223 DTSI Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 09/11] ARM: dts: sun8i-a33-sinlinx-sina33: " Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 10/11] ARM: dts: sun8i-r16-parrot: " Quentin Schulz
2016-12-09 11:04 ` [PATCH v2 11/11] ARM: dtsi: sun8i-reference-design-tablet: " Quentin Schulz
2016-12-12 8:07 ` Quentin Schulz [this message]
[not found] ` <20161209110419.28981-1-quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2016-12-17 15:54 ` [PATCH v2 00/11] add support for VBUS max current and min voltage limits AXP20X and AXP22X PMICs Sebastian Reichel
2017-01-12 9:28 ` Maxime Ripard
2017-01-21 1:10 ` Chen-Yu Tsai
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=2189bf2a-b577-85d6-c54a-0440aed05411@free-electrons.com \
--to=quentin.schulz@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@free-electrons.com \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
--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