Re: [PATCH 1/7] OMAP: PM: omap_device: add omap_hwmod_name_get_odev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/22/2011 08:19 AM, Benoit Cousson wrote:
From: Nishanth Menon<nm@xxxxxx>

An API which translates a standard hwmod name to corresponding
omap_device is useful for drivers when they need to look up the
device associated with a hwmod name to map back into the device
structure pointers. These ideally should be used by drivers in
mach directory. Using a generic hwmod name like "gpu" instead of
the actual device name which could change in the future, allows
us to:
a) Could in effect help replace apis such as omap2_get_mpuss_device,
omap2_get_iva_device, omap2_get_l3_device, omap4_get_dsp_device,
etc..
b) Scale to more devices rather than be restricted to named functions
c) Simplify driver's platform_data from passing additional fields
all doing the same thing with different function pointer names
just for accessing a different device name.

Signed-off-by: Nishanth Menon<nm@xxxxxx>
[b-cousson@xxxxxx: rebased on top of Kevin's changes]
Signed-off-by: Benoit Cousson<b-cousson@xxxxxx>
---
  arch/arm/plat-omap/include/plat/omap_device.h |    1 +
  arch/arm/plat-omap/omap_device.c              |   32 +++++++++++++++++++++++++
  2 files changed, 33 insertions(+), 0 deletions(-)

One other comment on the API here.

This is an omap_hwmod_* API being added to omap_device.h.

Seems like the function name should be something more like:
omap_device_get_by_name()  (or _get_by_hwmod_name() or something.)

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux