Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679773

Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management

From Charles Keepax <ckeepax@opensource.cirrus.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management
Date 2017-07-03 11:00 +0200
Message-ID <tZ5n3-78c-13@gated-at.bofh.it> (permalink)
References <tZ2Ix-5y7-5@gated-at.bofh.it> <tZ2Ix-5y7-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Jul 03, 2017 at 02:07:15PM +0800, Baolin Wang wrote:
> Integrate with the newly added USB charger interface to limit the current
> we draw from the USB input based on the input device configuration
> identified by the USB stack, allowing us to charge more quickly from high
> current inputs without drawing more current than specified from others.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
> ---
<snip>
>  /*********************************************************************
>   *		Battery properties
>   *********************************************************************/
> @@ -607,6 +647,22 @@ static int wm831x_power_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> +	power->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev,
> +						     "usb-phy", 0);
> +	if (IS_ERR(power->usb_phy)) {
> +		ret = PTR_ERR(power->usb_phy);
> +		dev_err(&pdev->dev, "Failed to find USB phy: %d\n", ret);
> +		goto err_bat_irq;
> +	}
> +

We should probably update the binding documentation for this as
well: mfd/wm831x.txt

Also I am not sure this needs to be implemented now, but what is
the plan regarding pdata systems? Generally the driver supports
both and it would be nice to know there is a way forward for that
even if we don't implement it yet.

Thanks,
Charles

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 3/3] power: wm831x_power: Support USB charger current limit management Baolin Wang <baolin.wang@linaro.org> - 2017-07-03 08:10 +0200
  Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current  limit management Charles Keepax <ckeepax@opensource.cirrus.com> - 2017-07-03 11:00 +0200
    Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current  limit management Baolin Wang <baolin.wang@linaro.org> - 2017-07-04 09:30 +0200
  Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current  limit management Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-03 18:00 +0200
    Re: [PATCH v2 3/3] power: wm831x_power: Support USB charger current  limit management Baolin Wang <baolin.wang@linaro.org> - 2017-07-04 09:30 +0200

csiph-web