From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Daniel Drake <dsd-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>
Cc: devicetree-discuss
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
Andres Salomon <dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org>
Subject: Re: Same parts of DT being probed twice
Date: Thu, 21 Jul 2011 15:15:08 -0500 [thread overview]
Message-ID: <4E2888CC.5050302@gmail.com> (raw)
In-Reply-To: <CAGq3pz5V0psn1QgUV7VGKCusc4kO+128OQAzUfmqSec4i2R8vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Daniel,
On 07/21/2011 09:46 AM, Daniel Drake wrote:
> 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?
>
I think you want to move up the gpio-leds to top level of the dts. The
leds are part of your board not part of the gpio controller, so they
should be separate. On the other hand, i2c slaves are typically under
the controller node, so perhaps gpio controller drivers need to scan for
sub devices like leds.
Rob
next prev parent reply other threads:[~2011-07-21 20:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2011-07-22 17:35 ` Grant Likely
[not found] ` <20110722173522.GA5974-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-22 19:22 ` Daniel Drake
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=4E2888CC.5050302@gmail.com \
--to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=dilinger-pFFUokh25LWsTnJN9+BGXg@public.gmane.org \
--cc=dsd-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.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).