Thread (1 message) 1 message, 1 author, 2013-12-16

Re: [PATCH 1/3] mfd: always assign of_node in mfd_add_device()

From: Lee Jones <hidden>
Date: 2013-12-16 08:12:42
Also in: linux-arm-kernel

On Fri, 13 Dec 2013, Stephen Warren wrote:
On 12/11/2013 02:24 AM, Lee Jones wrote:
quoted
quoted
From: Stephen Warren <redacted>

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 <redacted>
---
 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.
Thanks. I don't see this in linux-next yet though, so it's not getting
much testing. Did you forget to push your branch?
Pushed now, sorry for the delay.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help