devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Same parts of DT being probed twice
@ 2011-07-21 14:46 Daniel Drake
       [not found] ` <CAGq3pz5V0psn1QgUV7VGKCusc4kO+128OQAzUfmqSec4i2R8vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Drake @ 2011-07-21 14:46 UTC (permalink / raw)
  To: devicetree-discuss; +Cc: Andres Salomon

Hi,

We're working on enabling the HDD LED on the XO-1.5 laptop using
gpio-leds and its automatic interaction with the device tree. I have
it working locally, but there is something not quite right.

We have modified the device tree to add /pci/isa/gpios

gpios then has a child "gpio-leds" which has a child "hdd" as
described in Documentation/devicetree/bindings/gpio/gpio-leds.txt

This means that we must extend the "matches" list passed to
of_platform_bus_probe() in arch/x86/platform/olpc/olpc_dt.c so that
the search goes deep enough into the tree to find the gpio-leds
element and create a device for it. Specifically we must add:

	{ .compatible = "pci" },
	{ .compatible = "isa" },
	{ .compatible = "via,vx855-gpio" },
	{ .compatible = "gpio-leds" },

This works, but it causes huge duplication of the whole pci and isa
trees in /sys/devices. These devices were already created because
arch/x86/kernel/devicetree.c unconditionally calls
of_platform_bus_probe() for pci and isa devices (see add_bus_probe()
and ce4100_ids), but not for vx855-gpio and gpio-leds.

Whats the best way to solve this?

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-22 19:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21 14:46 Same parts of DT being probed twice Daniel Drake
     [not found] ` <CAGq3pz5V0psn1QgUV7VGKCusc4kO+128OQAzUfmqSec4i2R8vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-21 20:15   ` Rob Herring
2011-07-22 17:35   ` Grant Likely
     [not found]     ` <20110722173522.GA5974-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-22 19:22       ` Daniel Drake

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).