[Gta04-owner] [PATCH 2/2] drivers:power:twl4030-charger: don't check if battery is present

Nishanth Menon nm at ti.com
Thu Oct 29 20:50:26 CET 2015


On 10/29/2015 12:01 PM, H. Nikolaus Schaller wrote:
> We can't assume that the battery is present after probing (it can
> usually be removed while device is operated through external AC
> or USB power). So it makes no sense to check for it during probe.


Do you mean hot plug battery? you sure twl4030 is capable of dealing
with that :) ? we ran into all kinds of issues with LDP3430 trying to
make that logic work, finally came to the conclusion that the TWL4030
as it stands on LDP cannot just do that.

> 
> Signed-off-by: H. Nikolaus Schaller <hns at goldelico.com>
> ---
>  drivers/power/twl4030_charger.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
> index 859991f..e232453 100644
> --- a/drivers/power/twl4030_charger.c
> +++ b/drivers/power/twl4030_charger.c
> @@ -1008,13 +1008,6 @@ static int twl4030_bci_probe(struct platform_device *pdev)
>  	bci->irq_chg = platform_get_irq(pdev, 0);
>  	bci->irq_bci = platform_get_irq(pdev, 1);
>  
> -	/* Only proceed further *IF* battery is physically present */
> -	ret = twl4030_is_battery_present(bci);
> -	if  (ret) {
> -		dev_crit(&pdev->dev, "Battery was not detected:%d\n", ret);
> -		return ret;
> -	}
> -
>  	platform_set_drvdata(pdev, bci);
>  
>  	bci->ac = devm_power_supply_register(&pdev->dev, &twl4030_bci_ac_desc,
> 


-- 
Regards,
Nishanth Menon


More information about the Gta04-owner mailing list