All of lore.kernel.org
 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 1/2] drivers:power:twl4030-charger: fix problem with EPROBE_DEFER
Date: Thu, 29 Oct 2015 14:52:58 -0500	[thread overview]
Message-ID: <5632791A.4020204@ti.com> (raw)
In-Reply-To: <cfc5db66692e0415c86a08e2a3d37c2b299bf170.1446138086.git.hns@goldelico.com>

On 10/29/2015 12:01 PM, H. Nikolaus Schaller wrote:
> devm_usb_get_phy_by_node() may return -EPROBE_DEFER in which
> case we should also defer probing of the twl4030 charger
> instead of turing USB charging off (forever).

s/turing/turning

> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
> ---
>  drivers/power/twl4030_charger.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
> index 423e886..859991f 100644
> --- a/drivers/power/twl4030_charger.c
> +++ b/drivers/power/twl4030_charger.c
> @@ -1059,9 +1059,13 @@ static int twl4030_bci_probe(struct platform_device *pdev)
>  
>  		phynode = of_find_compatible_node(bci->dev->of_node->parent,
>  						  NULL, "ti,twl4030-usb");
> -		if (phynode)
> +		if (phynode) {
>  			bci->transceiver = devm_usb_get_phy_by_node(
>  				bci->dev, phynode, &bci->usb_nb);
> +			if (IS_ERR(bci->transceiver) &&
> +				PTR_ERR(bci->transceiver) == -EPROBE_DEFER)
I might align this with the IS_ERR

> +				return -EPROBE_DEFER;	/* PHY not ready */
> +		}
>  	}
>  
>  	/* Enable interrupts now. */
> 

Otherwise it looks good to me.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2015-10-29 19:53 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 [this message]
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
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=5632791A.4020204@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.