linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lee.jones@linaro.org (Lee Jones)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] mfd: always assign of_node in mfd_add_device()
Date: Fri, 20 Dec 2013 14:20:31 +0000	[thread overview]
Message-ID: <20131220142031.GJ3709@lee--X1> (raw)
In-Reply-To: <52B32C05.5010204@wwwdotorg.org>

On Thu, 19 Dec 2013, Stephen Warren wrote:

> On 12/11/2013 02:24 AM, Lee Jones wrote:
> >> From: Stephen Warren <swarren@nvidia.com>
> >>
> >> mfd_add_device() assigns .of_node in the device objects it creates only
> >> if the mfd_cell for the device has the .of_compatible field set and the
> >> DT node for the top-level MFD device contains a child whose compatible
> >> property matches the cell's .of_compatible field.
> >>
> >> This leaves .of_node unset in many cases. When this happens, entries in
> >> the DT /aliases property which refer to the top-level MFD DT node will
> >> never match the MFD child devices, hence causing the requested alias not
> >> to be honored.
> >>
> >> Solve this by setting each MFD child device's .of_node equal to the top-
> >> level MFD device's .of_node field in the cases where it would otherwise
> >> remain unset.
> >>
> >> The first use-case for this will be aliases for the TPS6586x's RTC
> >> device.
> >>
> >> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> >> ---
> >>  drivers/mfd/mfd-core.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> > 
> > I've tentatively applied this patch, but if it starts to cause more
> > problems than it solves we'll have to endeavour to find a different
> > solution.
> 
> OK, we've found a problem already! I guess we should drop or revert this
> patch (do you need me to send a patch to do this?) and I'll send a
> revised patch to the RTC core to look up aliases in a different way.
> 
> For the problem, see:
> http://www.spinics.net/lists/arm-kernel/msg295627.html

Ouch!

No, it's okay, I'll revert it no problem.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2013-12-20 14:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 22:06 [PATCH 1/3] mfd: always assign of_node in mfd_add_device() Stephen Warren
2013-12-09 22:06 ` [PATCH 2/3] rtc: honor device tree /alias entries when assigning IDs Stephen Warren
2013-12-09 22:06 ` [PATCH 3/3] ARM: tegra: set up /aliases entries for RTCs Stephen Warren
2013-12-10  8:40 ` [PATCH 1/3] mfd: always assign of_node in mfd_add_device() Lee Jones
2013-12-10 16:54   ` Stephen Warren
2013-12-11  9:24 ` Lee Jones
2013-12-13 19:28   ` Stephen Warren
2013-12-16  8:12     ` Lee Jones
2013-12-19 17:25   ` Stephen Warren
2013-12-20 14:20     ` Lee Jones [this message]
2013-12-20 14:25     ` Lee Jones
2013-12-20 16:11       ` Stephen Warren
2014-01-06 18:12       ` Stephen Warren
2014-01-07  8:23         ` 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=20131220142031.GJ3709@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).