From: Russell King - ARM Linux <linux@arm•linux.org.uk>
To: Sudeep Holla <sudeep.holla@arm•com>
Cc: "Guenter Roeck" <linux@roeck-us•net>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix•de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation•org>,
linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
linux-arm-kernel@lists•infradead.org
Subject: Re: arm qemu test failures due to 'driver-core: platform: probe of-devices only using list of compatibles'
Date: Mon, 15 Feb 2016 18:03:33 +0000 [thread overview]
Message-ID: <20160215180333.GK10826@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <56C20DD6.8050604@arm.com>
On Mon, Feb 15, 2016 at 05:41:42PM +0000, Sudeep Holla wrote:
> Sorry for missing this earlier, I could reproduce this on my TC2.
> The issue is with card-detect gpio probing. It's not related to AMBA
> probing as discussed on the mail thread.
>
> mfd_add_device adds devices with of_node when cell->of_compatible is
> matched, but the device created is expected to be matched based on name
> which the patch under discussion clearly breaks.
If I'm understanding you correctly, you're saying that MFD re-adds
platform devices with the of_node of a new platform device pointing
to an existing of_node, but expects this new platform device to
match a _different_ driver?
Sounds like MFD needs fixing. I've said this before: of_node's must
_never_ be copied between different device structures, especially
when they are on the _same_ bus - quite simply because the driver
core _can_ match using the DT compatible.
For example... let's say you have a platform device called "1234.foo"
created by DT with compatible of "example,foo". You have two platform
drivers. One of them matches compatible "example,foo" and the other
matches against platform devices with a name of "bar".
The "example,foo" device driver is matched against "1234.foo". It
creates a platform device with a name of "bar" and bus ID "bar.0",
setting the of_node to the same as "1234.foo".
When scanning for a matching driver, if the "example,foo" driver is
found first, "bar.0" will be matched to this driver, and its probe
method called. If it accepts this device, it will repeat its action,
creating "bar.1". Repeat until you run out of memory.
If it instead finds the "bar" driver first, this driver will be used
and everything appears to work correctly.
--
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-02-15 18:03 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-14 16:50 arm qemu test failures due to 'driver-core: platform: probe of-devices only using list of compatibles' Guenter Roeck
2016-02-14 19:55 ` Uwe Kleine-König
2016-02-14 20:07 ` Russell King - ARM Linux
2016-02-15 8:17 ` Uwe Kleine-König
2016-02-15 8:58 ` Russell King - ARM Linux
2016-02-15 9:14 ` Uwe Kleine-König
2016-02-15 10:04 ` Russell King - ARM Linux
2016-02-15 10:10 ` Uwe Kleine-König
2016-02-15 10:13 ` Russell King - ARM Linux
2016-02-14 21:08 ` Guenter Roeck
2016-02-15 7:48 ` Uwe Kleine-König
2016-02-15 10:59 ` Uwe Kleine-König
2016-02-15 13:11 ` Robin Murphy
2016-02-15 14:43 ` Russell King - ARM Linux
2016-02-15 16:27 ` Uwe Kleine-König
2016-02-15 16:49 ` Greg Kroah-Hartman
2016-02-15 17:12 ` Uwe Kleine-König
2016-02-15 21:03 ` Greg Kroah-Hartman
2016-02-15 15:41 ` Guenter Roeck
2016-02-15 16:12 ` Russell King - ARM Linux
2016-02-15 17:00 ` Uwe Kleine-König
2016-02-15 18:12 ` Guenter Roeck
2016-02-15 18:39 ` Sudeep Holla
2016-02-15 17:41 ` Sudeep Holla
2016-02-15 18:03 ` Russell King - ARM Linux [this message]
2016-02-15 18:15 ` Sudeep Holla
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=20160215180333.GK10826@n2100.arm.linux.org.uk \
--to=linux@arm$(echo .)linux.org.uk \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=linux@roeck-us$(echo .)net \
--cc=sudeep.holla@arm$(echo .)com \
--cc=u.kleine-koenig@pengutronix$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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