From: Lee Jones <lee.jones@linaro.org>
To: Robert Hancock <hancock@sedsystems.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] mfd: core: Support multiple OF child devices of the same type
Date: Mon, 10 Jun 2019 09:08:59 +0100 [thread overview]
Message-ID: <20190610080859.GJ4797@dell> (raw)
In-Reply-To: <bf3b9399-39c9-effb-8406-4eac2403da5c@sedsystems.ca>
On Thu, 06 Jun 2019, Robert Hancock wrote:
> On 2019-06-05 11:27 p.m., Lee Jones wrote:
> >>>> Without having the .of_full_name support, both MFD cells ended up
> >>>> wrongly matching against the i2c@c0000 device tree node since we just
> >>>> picked the first one where of_compatible matched.
> >>>
> >>> What is contained in each of their resources?
> >>
> >> These are the resource entries for those two devices:
> >>
> >> static const struct resource dbe_i2c1_resources[] = {
> >> {
> >> .start = 0xc0000,
> >> .end = 0xcffff,
> >> .name = "xi2c1_regs",
> >> .flags = IORESOURCE_MEM,
> >> .desc = IORES_DESC_NONE
> >> },
> >> };
> >>
> >> static const struct resource dbe_i2c2_resources[] = {
> >> {
> >> .start = 0xd0000,
> >> .end = 0xdffff,
> >> .name = "xi2c2_regs",
> >> .flags = IORESOURCE_MEM,
> >> .desc = IORES_DESC_NONE
> >> },
> >> };
> >
> > This is your problem. You are providing the memory resources through
> > *both* DT and MFD. I don't believe I've seen your MFD driver, but it
> > looks like it's probably not required at all. Just allow DT to probe
> > each of your child devices. You can obtain the IO memory from there
> > directly using the usual platform_get_resource() calls.
>
> As far as I can tell, the DT child devices underneath a PCIe device
> don't get probed and drivers loaded automatically - possibly for valid
> reasons. The MFD driver appears to be required in order to actually get
> drivers attached to those DT nodes.
You need to call of_platform_populate().
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2019-06-10 8:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 22:35 [PATCH 0/2] MFD core updates for device tree binding support Robert Hancock
2019-06-04 22:35 ` [PATCH 1/2] mfd: core: Support multiple OF child devices of the same type Robert Hancock
2019-06-05 6:31 ` Lee Jones
2019-06-05 16:23 ` Robert Hancock
2019-06-05 18:45 ` Lee Jones
2019-06-05 19:26 ` Robert Hancock
2019-06-06 5:27 ` Lee Jones
2019-06-06 15:33 ` Robert Hancock
2019-06-10 8:08 ` Lee Jones [this message]
2019-06-04 22:35 ` [PATCH 2/2] mfd: core: Set fwnode for created devices Robert Hancock
2019-06-05 6:31 ` Lee Jones
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=20190610080859.GJ4797@dell \
--to=lee.jones@linaro.org \
--cc=hancock@sedsystems.ca \
--cc=linux-kernel@vger.kernel.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