linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: "H. Nikolaus Schaller" <hns@goldelico.com>,
	"Gražvydas Ignotas" <notasas@gmail.com>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Dmitry Eremin-Solenikov" <dbaryshkov@gmail.com>,
	"David Woodhouse" <dwmw2@infradead.org>
Cc: linux-pm@vger.kernel.org, gta04-owner@goldelico.com
Subject: Re: [PATCH 2/2] drivers:power:twl4030-charger: don't check if battery is present
Date: Thu, 29 Oct 2015 14:50:26 -0500	[thread overview]
Message-ID: <56327882.2030205@ti.com> (raw)
In-Reply-To: <72eab67d8ae1e25803a78a4636c8da78b7a0d32f.1446138086.git.hns@goldelico.com>

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

  reply	other threads:[~2015-10-29 19:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29 17:01 [PATCH 0/2] Fixes for twl4030 charger H. Nikolaus Schaller
2015-10-29 17:01 ` [PATCH 1/2] drivers:power:twl4030-charger: fix problem with EPROBE_DEFER H. Nikolaus Schaller
2015-10-29 19:52   ` Nishanth Menon
2015-10-30  6:01     ` H. Nikolaus Schaller
2015-10-29 17:01 ` [PATCH 2/2] drivers:power:twl4030-charger: don't check if battery is present H. Nikolaus Schaller
2015-10-29 19:50   ` Nishanth Menon [this message]
2015-10-30  6:14     ` H. Nikolaus Schaller

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=56327882.2030205@ti.com \
    --to=nm@ti.com \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=gta04-owner@goldelico.com \
    --cc=hns@goldelico.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=notasas@gmail.com \
    --cc=sre@kernel.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).