Re: [PATCH] powerpc/85xx: don't call of_platform_bus_probe() twice

From
Grant Likely <hidden>
Date
2012-03-20 17:09:48
Reply to
Timur Tabi, 2012-03-19
On Mon, 19 Mar 2012 13:43:29 -0500, Timur Tabi [off-list ref] wrote:
Grant Likely wrote:
quoted
The problem is that you want to create devices for grandchildren
nodes when the bus ids passed in don't match any of the child nodes so
the of_platform_bus_probe() doesn't iterate down to that level.  This
is correct and expected behaviour.
Well, I'm not still not 100% sure on what I'm supposed to do, so I tried this:

static struct of_device_id __initdata p1022_ds_ids[] = {
	/* The audio driver probes the SSI DMA channels individually */
	{ .compatible = "fsl,ssi-dma-channel", },
	{},
};

static int __init p1022_ds_publish_devices(void)
{
	struct device_node *np;
	int ret;

	mpc85xx_common_publish_devices();

	for_each_compatible_node(np, NULL, "fsl,eloplus-dma") {
		ret = of_platform_bus_probe(np, p1022_ds_ids, NULL);
		if (ret)
			return ret;
Does a driver bind against "fsl,eloplus-dma"?  If so, then I would
call of_platform_populate() from within the fsl,eloplus-dma driver's
probe method.

g.
Thread (13 messages) 13 messages, 3 authors, last reply 2012-04-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help