[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243497521.3171.161.camel@pasglop>
Date: Thu, 28 May 2009 17:58:41 +1000
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Grant Likely <grant.likely@...retlab.ca>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@...osoft.com>,
devicetree-discuss <devicetree-discuss@...abs.org>,
Russell King - ARM Linux <linux@....linux.org.uk>,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.arm.linux.org.uk,
Jon Smirl <jonsmirl@...il.com>,
Scott Wood <scottwood@...escale.com>,
Janboe Ye <yuan-bo.ye@...orola.com>,
Timur Tabi <timur@...escale.com>
Subject: Re: [RFC] [PATCH] Device Tree on ARM platform
On Wed, 2009-05-27 at 14:54 -0600, Grant Likely wrote:
> > Have to duplicated ressource handling via ifdef in every drivers is
> also an
> > overhead which need to be avoided
>
> agreed. I don't have a best of both worlds answer here.
Right and I don't advocate changing existing perfectly working platform
drivers, I think having wrappers to create them is fine.
In fact, I've been thinking for a long time about doing something like
that: Have those wrappers be registered via a standard OF set of match
strings for bus types and device types.
Then we can have a single loop that walks the tree, invoke those
"constructors" that return a struct device * (whatever the device
type that was actually created, could have been platform_device,
pci_dev, amba_device, etc...). It also passes them the parent device *
That way, all devices are instanciated from the DT -and- the topology
in sysfs preserves the topology in the device-tree (ie, parent/child
relationships are preserved).
Cheers,
Ben.
--
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