aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/omap_device.h
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-07-27 16:02:32 -0400
committerKevin Hilman <khilman@ti.com>2011-10-04 12:52:22 -0400
commit1f8a7d5207a2a343af7c3b18fcc65dc6aa1fb068 (patch)
tree69e6bbeb81fe4c7341960b7ea1909b85800d913a /arch/arm/plat-omap/include/plat/omap_device.h
parentc541c15fb5ab48c47bc9b90121538fd30d152f23 (diff)
ARM: OMAP: omap_device: Add omap_device_get_by_hwmod_name
An API which translates a standard hwmod name to corresponding platform_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@ti.com> [b-cousson@ti.com: Adapt it to the new pdev pointer inside od, remove the unneeded helpers, and fold the next patch here] Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/omap_device.h')
-rw-r--r--arch/arm/plat-omap/include/plat/omap_device.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h
index d4d9b96f961e..12c5b0c345bf 100644
--- a/arch/arm/plat-omap/include/plat/omap_device.h
+++ b/arch/arm/plat-omap/include/plat/omap_device.h
@@ -101,6 +101,7 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
101 int pm_lats_cnt, int is_early_device); 101 int pm_lats_cnt, int is_early_device);
102 102
103void __iomem *omap_device_get_rt_va(struct omap_device *od); 103void __iomem *omap_device_get_rt_va(struct omap_device *od);
104struct device *omap_device_get_by_hwmod_name(const char *oh_name);
104 105
105/* OMAP PM interface */ 106/* OMAP PM interface */
106int omap_device_align_pm_lat(struct platform_device *pdev, 107int omap_device_align_pm_lat(struct platform_device *pdev,