Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: David Jander <david.jander@protonic.nl>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Wolfram Sang <w.sang@pengutronix.de>,
	Liam Girdwood <lrg@ti.com>
Subject: Re: ASoC driver parts probing order (MPC5200/MPC5121)
Date: Thu, 20 Oct 2011 15:26:33 +0200	[thread overview]
Message-ID: <20111020152633.2d91146a@archvile> (raw)
In-Reply-To: <20111020123513.GA3484@opensource.wolfsonmicro.com>

On Thu, 20 Oct 2011 13:35:13 +0100
Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> > of the probe function. So obviously, it is supposed that the DMA driver
> > somehow gets probed before the PSC driver, but I can't see where this is
> > enforced. AFAIK, the order is fairly random, so it could be the other way
> > around.... and indeed, in my case it is.
> 
> The order the device model devices get probed in is entirely random and
> any driver which is relying on this is buggy.

That's what I understood, but I was being reluctant to fix something I
couldn't prove to be broken, nor being able to verify the fix. Fortunately
Wolfram Sang offered to help out with testing on the MPC5200B.

> > 2.- Simply turning the dev_get/set_drvdata and chip initialization order
> > around does work in my case, but doesn't seem a robust solution to me. Any
> > idea how this should be handled?
> 
> I'd expect that delaying whatever relies on both devices being there
> until the ASoC level probes happen is the way forward - you're
> guaranteed that both deivces will be present there and the probe
> ordering is guaranteed stable.

Thanks. I will investigate that path.
If you have a quick look at the named files(mpc5200-ac97.c and mpc5200_dma.c)
in mainline, can you confirm that it is indeed the wrong way of doing this?

Best regards,

-- 
David Jander
Protonic Holland.

      reply	other threads:[~2011-10-20 13:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 10:23 ASoC driver parts probing order (MPC5200/MPC5121) David Jander
2011-10-20 10:59 ` Wolfram Sang
2011-10-20 11:37   ` David Jander
2011-10-20 12:13     ` Wolfram Sang
2011-10-20 12:27       ` David Jander
2011-10-20 12:35 ` Mark Brown
2011-10-20 13:26   ` David Jander [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=20111020152633.2d91146a@archvile \
    --to=david.jander@protonic.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@ti.com \
    --cc=w.sang@pengutronix.de \
    /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