[PATCH] clkdev: add support to lookup for early platform device
From: gregkh@suse.de (Greg KH)
Date: 2011-04-27 22:12:04
On Wed, Apr 27, 2011 at 05:00:57PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 12:47 Wed 27 Apr , Jean-Christophe PLAGNIOL-VILLARD wrote:quoted
On 12:31 Wed 27 Apr , Jean-Christophe PLAGNIOL-VILLARD wrote:quoted
On 09:42 Wed 27 Apr , Russell King - ARM Linux wrote:quoted
On Wed, Apr 20, 2011 at 04:05:14PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:quoted
early platform device may do not have a device name as the slab is not yet available. So to search a clock base on the dev_id we need to search first the device base name and then the idI really don't like this. IDs are platform device specific, and this is a platform devince independent layer. If you want to do this, then add a platform_device_clk_get() call, which takes the platform device and connection id. Uses the platform device infrastructure to format the device name, and use clk_get_sys() to look up the device/connection id from that.I do not want to alloc a string in the clkdev but if you preferI check we can not do so if slab is not available we can not use kmalloc so we can not generate the dev.init_nameI check also we can not use the bootmem as it's too early in the init so allocate the dev_id is not possible use a satic buffer I'm not so happy about it the only other solution is this one which Greg or you prefer
I have no idea what you are asking, please be more specific, hopefully including a patch showing what you are referring to. thanks, greg k-h