[PATCH] clkdev: add support to lookup for early platform device

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Apr 27 04:42:47 EDT 2011


On Wed, Apr 20, 2011 at 04:05:14PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 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 id

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

Not only will that be more simple, but it'll also avoid putting bus-
specific code into bus-agnostic layers.



More information about the linux-arm-kernel mailing list