From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Linus Walleij <linus.ml.walleij@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@stericsson.com>,
Liam Girdwood <lrg@slimlogic.co.uk>,
Samuel Ortiz <sameo@linux.intel.com>,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.arm.linux.org.uk,
Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH] AB3100 regulator support v1
Date: Sun, 30 Aug 2009 11:34:49 +0100 [thread overview]
Message-ID: <20090830103448.GD4334@sirena.org.uk> (raw)
In-Reply-To: <63386a3d0908291603i76603a17hc20a8d219c1dc07a@mail.gmail.com>
On Sun, Aug 30, 2009 at 01:03:38AM +0200, Linus Walleij wrote:
[While setting up a child platform device from a platform driver
probe...]
> >> + /* This would seem logical but makes everything break... */
> >> + /* pdev->dev.parent = parent; */
> > Err... it does? In what way?
> The sub-platform devices are added, but when I add a platform driver for
> them, the probing does not commence, because they hang in
> driver base/dd.c: __driver_attach() trying to take the parent semaphore,
> i.e. this line:
> if (dev->parent) /* Needed for USB */
> down(&dev->parent->sem);
> In this case the parent is ab3100-regulators, the platform device for
> the set of regulators.
On the face of it (and without having actually looked at a running
system or anything yet) I'm rather surprised that platform based MFD
drivers aren't running into this issue more often. CCing in Alan who
made the change.
However, fixing this is not required to avoid the issue for this
particular driver. The problem is being caused because in addition to
the core MFD driver for the device you've chosen to create both a
platform device covering all regulators and further per-regulator child
platform devices. If you create only one level of child device for the
MFD you'll avoid the issue because your core device is an I2C device.
Either have a device per regulator or have a single device which
registers multiple regulators. The regulator API doesn't mind what you
do so long as it gets a parent for the class device so do whatever seems
sensible for your driver.
next prev parent reply other threads:[~2009-08-30 10:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 22:11 Linus Walleij
2009-08-21 10:56 ` Mark Brown
2009-08-29 23:03 ` Linus Walleij
2009-08-30 0:37 ` Linus Walleij
2009-08-30 10:08 ` Mark Brown
2009-08-30 10:34 ` Mark Brown [this message]
2009-08-30 12:51 ` Linus Walleij
2009-08-30 13:03 ` Mark Brown
2009-08-30 16:27 ` Alan Stern
2009-08-30 19:01 ` Mark Brown
2009-08-31 20:27 ` Alan Stern
2009-09-01 12:12 ` Russell King - ARM Linux
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=20090830103448.GD4334@sirena.org.uk \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linus.ml.walleij@gmail.com \
--cc=linus.walleij@stericsson.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lrg@slimlogic.co.uk \
--cc=sameo@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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
all inboxes | Powered by JetHome®