public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ASoC: sgtl5000: Defer probe in case of I2C error
Date: Wed, 26 Jun 2013 09:33:08 +0100	[thread overview]
Message-ID: <20130626083308.GL27646@sirena.org.uk> (raw)
In-Reply-To: <1372168801-4221-3-git-send-email-fabio.estevam@freescale.com>

On Tue, Jun 25, 2013 at 11:00:01AM -0300, Fabio Estevam wrote:
> In case of I2C error, let's defer the probe.
> 
> On mx28, for example, the first read of the codec revision register fails 
> because there is no codec clock provided at this point. The codec clock will be 
> enabled later in the mxs-saif driver, so return -EPROBE_DEFER in case of I2C 
> read error, so that the codec driver can do another attempt at a later stage 
> when the codec clock is available.

This doesn't seem to match up with the code:

>  	ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, &reg);
> -	if (ret)
> +	if (ret) {
> +		ret = -EPROBE_DEFER; /* If I2C read failed, try again later */
>  		goto disable_clk;
>  
> +	}

Looking at the label we jump to here it seems like the clock really
should be enabled at the point where the register read is attempted...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130626/aa9024db/attachment.sig>

      reply	other threads:[~2013-06-26  8:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-25 13:59 [PATCH 1/3] clk: mxs: clk-imx28: Provide a dummy clock Fabio Estevam
2013-06-25 14:00 ` [PATCH 2/3] ARM: dts: mx28: Provide a codec clock Fabio Estevam
2013-06-25 14:22   ` Shawn Guo
2013-06-25 17:27     ` Mike Turquette
2013-06-25 14:00 ` [PATCH 3/3] ASoC: sgtl5000: Defer probe in case of I2C error Fabio Estevam
2013-06-26  8:33   ` Mark Brown [this message]

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=20130626083308.GL27646@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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