All of lore.kernel.org
 help / color / mirror / Atom feed
From: troy.kisky@boundarydevices.com (Troy Kisky)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mach-imx6q: Enable the codec clock earlier
Date: Fri, 07 Jun 2013 16:49:17 -0700	[thread overview]
Message-ID: <51B2717D.4080500@boundarydevices.com> (raw)
In-Reply-To: <51B27010.5060603@boundarydevices.com>

On 6/7/2013 4:43 PM, Troy Kisky wrote:
> On 6/7/2013 4:16 PM, Fabio Estevam wrote:
>> Hi Russell,
>>
>> On Fri, Jun 7, 2013 at 7:20 PM, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>>
>>> Umm... doesn't that mean that imx-sgtl5000 should be getting this clock
>>> and turning it on itself, and disabling it on device removal?
>> Yes, you are right.
>>
>> Actually imx-sgtl500 does get this clock and turn it on itself.
>>
>> The problem is that imx-sgtl5000 is getting called after the codec
>> sgtl500 codec is probed.
>>
>> ***** reading codec ID
>> sgtl5000: probe of 0-000a failed with error -5
>> ***** enabling the codec clock
>> imx-sgtl5000 sound.13: ASoC: CODEC (null) not registered
>> imx-sgtl5000 sound.13: snd_soc_register_card failed (-517)
>> platform sound.13: Driver imx-sgtl5000 requests probe deferral
>>
>>
>> And then If I do:
>>
>> --- a/sound/soc/codecs/sgtl5000.c
>> +++ b/sound/soc/codecs/sgtl5000.c
>> @@ -1525,7 +1525,7 @@ static int sgtl5000_i2c_probe(struct i2c_client 
>> *client,
>>          /* read chip information */
>>          ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, &reg);
>>          if (ret)
>> -               return ret;
>> +               return -EPROBE_DEFER;
>>
>>          if (((reg & SGTL5000_PARTID_MASK) >> SGTL5000_PARTID_SHIFT) !=
>>              SGTL5000_PARTID_PART_ID) {
>>
>> Then the probe is succesful on the second attemp.
>>
>> I will post this to the alsa-devel list.
>>
>> Thanks,
>>
>> Fabio Estevam
>>
>
> Perhaps a delay is needed after the clock is turned on, to when you 
> can read a register.
>
> Using -EPROBE_DEFER seems like an abuse. Shouldn't it turn the clock 
> back off before it returns anyway?
>
> Troy
>
Sorry, I read that wrong.  Maybe sgtl5000 needs to get the clock, as 
well as imx-sgtl5000.


Troy

  parent reply	other threads:[~2013-06-07 23:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07 22:07 [PATCH] ARM: mach-imx6q: Enable the codec clock earlier Fabio Estevam
2013-06-07 22:20 ` Russell King - ARM Linux
2013-06-07 23:16   ` Fabio Estevam
2013-06-07 23:43     ` Troy Kisky
2013-06-07 23:49       ` Fabio Estevam
2013-06-07 23:49       ` Troy Kisky [this message]
2013-06-10  9:10         ` Mark Brown
2013-06-10  9:07       ` Mark Brown

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=51B2717D.4080500@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --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 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.