linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sre@kernel.org>
To: Icenowy Zheng <icenowy@aosc.io>
Cc: Chen-Yu Tsai <wens@csie.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH 1/2] power: supply: axp20x_usb_power: enable USB BC detection on AXP813
Date: Mon, 14 Oct 2019 06:22:20 +0200	[thread overview]
Message-ID: <20191014042220.ic6gt7koyr23iq26@earth.universe> (raw)
In-Reply-To: <20191002112545.58481-2-icenowy@aosc.io>

[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]

Hi,

On Wed, Oct 02, 2019 at 07:25:44PM +0800, Icenowy Zheng wrote:
> The AXP813 PMIC has support for detection of USB Battery Charging
> specification, and it will limit the current to 500mA by default when
> the detection is not enabled or the detection result is SDP.
> 
> Enable the BC detection to allow correctly selection of the current.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
> ---

Thanks, queued to power-supply-next.

-- Sebastian

>  drivers/power/supply/axp20x_usb_power.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supply/axp20x_usb_power.c
> index dc4c316eff81..5f0a5722b19e 100644
> --- a/drivers/power/supply/axp20x_usb_power.c
> +++ b/drivers/power/supply/axp20x_usb_power.c
> @@ -48,6 +48,8 @@
>  
>  #define AXP20X_VBUS_MON_VBUS_VALID	BIT(3)
>  
> +#define AXP813_BC_EN		BIT(0)
> +
>  /*
>   * Note do not raise the debounce time, we must report Vusb high within
>   * 100ms otherwise we get Vbus errors in musb.
> @@ -495,6 +497,12 @@ static int axp20x_usb_power_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> +	if (power->axp20x_id == AXP813_ID) {
> +		/* Enable USB Battery Charging specification detection */
> +		regmap_update_bits(axp20x->regmap, AXP288_BC_GLOBAL,
> +				   AXP813_BC_EN, AXP813_BC_EN);
> +	}
> +
>  	psy_cfg.of_node = pdev->dev.of_node;
>  	psy_cfg.drv_data = power;
>  
> -- 
> 2.21.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-10-14 21:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 11:25 [PATCH 0/2] Enable USB BC detection to raise AXP813 Vbus current Icenowy Zheng
2019-10-02 11:25 ` [PATCH 1/2] power: supply: axp20x_usb_power: enable USB BC detection on AXP813 Icenowy Zheng
2019-10-14  4:22   ` Sebastian Reichel [this message]
2019-10-02 11:25 ` [PATCH 2/2] power: supply: axp20x_usb_power: add applied max Vbus support for AXP813 Icenowy Zheng
2019-10-07 16:07   ` [linux-sunxi] " Chen-Yu Tsai
2019-10-08  3:09     ` Icenowy Zheng
2019-10-08  3:14       ` Chen-Yu Tsai
2019-10-14  4:24     ` Sebastian Reichel

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=20191014042220.ic6gt7koyr23iq26@earth.universe \
    --to=sre@kernel.org \
    --cc=icenowy@aosc.io \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.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;
as well as URLs for NNTP newsgroup(s).