Thread (1 message) 1 message, 1 author, 2011-08-03

Re: Shouldn't DT preserve pdev name and id to allow platform_match to work?

From: Cousson, Benoit <hidden>
Date: 2011-08-03 16:27:04
Also in: linux-arm-kernel, linux-omap

Hi Manju,

On 8/3/2011 6:17 PM, G, Manjunath Kondaiah wrote:
Hi Benoit,

On Wed, Aug 3, 2011 at 8:34 PM, Cousson, Benoit[off-list ref]  wrote:
quoted
Hi Grant,

Going further with the usage of OF_DEV_AUXDATA_ID, I realized that this is is not doing what I was expecting. My expectation might be silly, but in order to make platform_match to work without DT matching mechanism, you need to have the driver name in the pdev->name field:

        /* fall-back to driver name match */
        return (strcmp(pdev->name, drv->name) == 0);

Except that the of_device_add function is doing that:
        pdev->name = dev_name(&ofdev->dev);
        pdev->id = -1;
This is taken here:
http://git.secretlab.ca/?p=linux-2.6.git;a=commitdiff;h=04f51955dc690666467252015a931d71d5c56696

and it is pending for upstream.

With the above patch, both pdev->name and pdev->id can be set as per
hwmod requirement through aux_data lookup table.
Mmm, but I'm already using that patch, and it is only taking care of the 
pdev->id, hence my email. Did I miss something?
we might have to append pdev->id to pdev->name so that
it can used for device look up in the hwmod
device list.
I'm not sure to get your point here.

Benoit
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help