lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191014042220.ic6gt7koyr23iq26@earth.universe>
Date:   Mon, 14 Oct 2019 06:22:20 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Icenowy Zheng <icenowy@...c.io>
Cc:     Chen-Yu Tsai <wens@...e.org>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-sunxi@...glegroups.com
Subject: Re: [PATCH 1/2] power: supply: axp20x_usb_power: enable USB BC
 detection on AXP813

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@...c.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
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ