Re: [PATCH] power: supply: cpcap-charger: Add missing power_supply_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Jun 14, 2017 at 09:41:08PM -0700, Tony Lindgren wrote:
> Otherwise cpcap-battery won't probe properly with the power-supplies
> property configured but will fail with "Not all required supplies found,
> defer probe".
> 
> Cc: Marcel Partap <mpartap@xxxxxxx>
> Cc: Michael Scott <michael.scott@xxxxxxxxxx>
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>

Thanks, queued.

-- Sebastian

> ---
>  drivers/power/supply/cpcap-charger.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cpcap-charger.c
> --- a/drivers/power/supply/cpcap-charger.c
> +++ b/drivers/power/supply/cpcap-charger.c
> @@ -637,6 +637,7 @@ static int cpcap_charger_probe(struct platform_device *pdev)
>  {
>  	struct cpcap_charger_ddata *ddata;
>  	const struct of_device_id *of_id;
> +	struct power_supply_config psy_cfg = {};
>  	int error;
>  
>  	of_id = of_match_device(of_match_ptr(cpcap_charger_id_table),
> @@ -665,9 +666,12 @@ static int cpcap_charger_probe(struct platform_device *pdev)
>  
>  	atomic_set(&ddata->active, 1);
>  
> +	psy_cfg.of_node = pdev->dev.of_node;
> +	psy_cfg.drv_data = ddata;
> +
>  	ddata->usb = devm_power_supply_register(ddata->dev,
>  						&cpcap_charger_usb_desc,
> -						NULL);
> +						&psy_cfg);
>  	if (IS_ERR(ddata->usb)) {
>  		error = PTR_ERR(ddata->usb);
>  		dev_err(ddata->dev, "failed to register USB charger: %i\n",
> -- 
> 2.13.0

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux