[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110223184402.GM14597@angua.secretlab.ca>
Date: Wed, 23 Feb 2011 11:44:03 -0700
From: Grant Likely <grant.likely@...retlab.ca>
To: Rob Herring <robherring2@...il.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
devicetree-discuss@...ts.ozlabs.org, sfr@...b.auug.org.au,
linux-kernel@...r.kernel.org, davem@...emloft.net,
sparclinux@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [RFC PATCH 02/15] dt: add a match table pointer to struct
device
On Wed, Feb 23, 2011 at 12:29:03PM -0600, Rob Herring wrote:
> Grant,
>
> On 02/22/2011 10:33 PM, Grant Likely wrote:
> >Add a new .of_match field to struct device which points at the
> >matching device driver .of_match_table entry when a device is probed
> >via the device tree
> >
> >Signed-off-by: Grant Likely<grant.likely@...retlab.ca>
> >---
> > include/linux/device.h | 1 +
> > include/linux/of_device.h | 5 +++--
> > 2 files changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/include/linux/device.h b/include/linux/device.h
> >index ca5d252..8d8e267 100644
> >--- a/include/linux/device.h
> >+++ b/include/linux/device.h
> >@@ -441,6 +441,7 @@ struct device {
> > struct dev_archdata archdata;
> >
> > struct device_node *of_node; /* associated device tree node */
> >+ const struct of_device_id *of_match; /* matching of_device_id from driver */
>
> Couldn't of_match/of_match_table be merged into the platform dev/drv
> id_entry/id_table. Handling MODALIAS for a driver that does both OF
> style and normal platform device matching may be a problem though.
.of_match & .of_match_table works on all devices, not just
platform devices. It allows the common library of device tree support
routines to be used with any bus type.
g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists