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

From: Timur Tabi <[email-masked]>
Date: Tue, 20 Mar 2012 12:25:03 -0500

Grant Likely wrote:

> 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.

Well, there are two "DMA" drivers.

The one in drivers/dma binds on fsl,eloplus-dma, and then manually scans
for children with the "fsl,eloplus-dma-channel" compatible.  This driver
works today because the fsl,eloplus-dma nodes are children of the SOC
node, which is already probed.

The other is in sound/soc/fsl and binds on "fsl,ssi-dma-channel".  These
are also children of the fsl,eloplus-dma node.  This driver does NOT work
today, because the fsl,eloplus-dma is not probed.

I do not want the two drivers to depend on each other.  They are
completely separate.  So I don't want to call of_platform_populate() from
the drivers/dma driver.  I could call it from the sound/soc/fsl driver,
however.  I will try to see if that works.

They only problem I see with this is that I am thinking about modifying
the drivers/dma driver to probe on "fsl,eloplus-dma-channel" channels
directly.  If I do that, then who should call of_platform_populate()?

-- 
Timur Tabi
Linux kernel developer at Freescale