From: Chen-Yu Tsai <wens@csie.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Lee Jones <lee.jones@linaro.org>,
Sebastian Reichel <sre@kernel.org>
Cc: devicetree@vger.kernel.org,
Quentin Schulz <quentin.schulz@bootlin.com>,
linux-pm@vger.kernel.org, linux-sunxi@googlegroups.com,
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
Chen-Yu Tsai <wens@csie.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/9] power: supply: axp20x_usb_power: allow disabling input current limiting
Date: Mon, 25 Feb 2019 11:31:01 +0800 [thread overview]
Message-ID: <20190225033107.17326-4-wens@csie.org> (raw)
In-Reply-To: <20190225033107.17326-1-wens@csie.org>
The AXP PMICs allow the user to disable current limiting on the VBUS
input. While read-out of this setting was already supported by the
driver, it did not allow the user to configure the PMIC to disable
current limiting.
Add support for this.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
drivers/power/supply/axp20x_usb_power.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
index cd9b90d79839..e2f353906bb1 100644
--- a/drivers/power/supply/axp20x_usb_power.c
+++ b/drivers/power/supply/axp20x_usb_power.c
@@ -230,6 +230,11 @@ static int axp20x_usb_power_set_current_max(struct axp20x_usb_power *power,
return regmap_update_bits(power->regmap,
AXP20X_VBUS_IPSOUT_MGMT,
AXP20X_VBUS_CLIMIT_MASK, val);
+ case -1:
+ return regmap_update_bits(power->regmap,
+ AXP20X_VBUS_IPSOUT_MGMT,
+ AXP20X_VBUS_CLIMIT_MASK,
+ AXP20X_VBUS_CLIMIT_NONE);
default:
return -EINVAL;
}
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-25 3:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 3:30 [PATCH v2 0/9] ARM: sun8i: a83t: Enable USB OTG Chen-Yu Tsai
2019-02-25 3:30 ` [PATCH v2 1/9] dt-bindings: power: supply: axp20x_usb_power: add axp813 compatible Chen-Yu Tsai
2019-02-27 23:43 ` Rob Herring
2019-02-25 3:31 ` [PATCH v2 2/9] power: supply: axp20x_usb_power: Fix typo in VBUS current limit macros Chen-Yu Tsai
2019-02-25 3:31 ` Chen-Yu Tsai [this message]
2019-02-25 3:31 ` [PATCH v2 4/9] power: supply: axp20x_usb_power: use polling to detect vbus status change Chen-Yu Tsai
2019-02-25 3:31 ` [PATCH v2 5/9] power: supply: axp20x_usb_power: add function to get max current Chen-Yu Tsai
2019-02-25 3:31 ` [PATCH v2 6/9] power: supply: axp20x_usb_power: add support for AXP813 Chen-Yu Tsai
2019-02-25 3:31 ` [PATCH v2 7/9] mfd: axp20x: add USB power supply mfd cell to AXP813 Chen-Yu Tsai
2019-02-25 3:31 ` [PATCH v2 8/9] ARM: dtsi: axp81x: add USB power supply node Chen-Yu Tsai
2019-02-25 3:31 ` [PATCH v2 9/9] ARM: dts: sun8i: a83t: Enable USB OTG controller on some boards 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=20190225033107.17326-4-wens@csie.org \
--to=wens@csie.org \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--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-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--cc=quentin.schulz@bootlin.com \
--cc=robh+dt@kernel.org \
--cc=sre@kernel.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).