Same parts of DT being probed twice
Daniel Drake
dsd at laptop.org
Fri Jul 22 00:46:02 EST 2011
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
More information about the devicetree-discuss
mailing list