From: Grant Likely <grant.likely@secretlab.ca>
To: Nicolas Pitre <nicolas.pitre@linaro.org>,
devicetree-discuss@lists.ozlabs.org,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Russell King <linux@arm.linux.org.uk>, Arnd Bergmann <arnd@arndb.de>
Subject: [PATCH 1/5] dt: Add default match table for bus ids
Date: Tue, 21 Jun 2011 12:44:53 -0600 [thread overview]
Message-ID: <20110621184453.18176.95533.stgit@ponder> (raw)
In-Reply-To: <20110621181127.18176.1384.stgit@ponder>
No need for most platforms to define their own bus table when calling
of_platform_populate(). Supply a stock one.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/of/platform.c | 8 ++++++++
include/linux/of_platform.h | 2 ++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 63d3cb7..bb483ef 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -22,6 +22,14 @@
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+const struct of_device_id of_default_bus_match_table[] = {
+ { .compatible = "simple-bus", },
+#ifdef CONFIG_ARM_AMBA
+ { .compatible = "arm,amba-bus", },
+#endif /* CONFIG_ARM_AMBA */
+ {} /* Empty terminated list */
+};
+
static int of_dev_node_match(struct device *dev, void *data)
{
return dev->of_node == data;
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index fb51ae3..8f023f8 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -40,6 +40,8 @@ struct of_platform_driver
#define to_of_platform_driver(drv) \
container_of(drv,struct of_platform_driver, driver)
+extern const struct of_device_id of_default_bus_match_table[];
+
/* Platform drivers register/unregister */
extern struct platform_device *of_device_alloc(struct device_node *np,
const char *bus_id,
next prev parent reply other threads:[~2011-06-21 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 18:44 [PATCH 0/5] dt: Device creation infrastructure Grant Likely
2011-06-21 18:44 ` Grant Likely [this message]
2011-06-21 18:44 ` [PATCH 2/5] dt: add of_platform_populate() for creating device from the device tree Grant Likely
2011-06-21 18:45 ` [PATCH 3/5] drivers/amba: create devices from " Grant Likely
2011-06-21 20:07 ` Rob Herring
2011-06-23 20:55 ` Grant Likely
2011-06-21 18:45 ` [PATCH 4/5] dt/platform: allow device name to be overridden Grant Likely
2011-06-21 18:45 ` [PATCH 5/5] powerpc/5200: convert mpc5200 to use of_platform_populate() Grant Likely
2012-03-20 16:20 ` Anatolij Gustschin
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=20110621184453.18176.95533.stgit@ponder \
--to=grant.likely@secretlab.ca \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicolas.pitre@linaro.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;
as well as URLs for NNTP newsgroup(s).