From d72fbdf01fc77628c0b837d0dd2fd564fa26ede6 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 8 Nov 2008 20:08:08 +0000 Subject: [ARM] integrator: convert to clkdev and lookup clocks by device name People often point to the Integrator/Versatile/Realview implementations to justify using the consumer name as the sole selector for clocks. Eliminate this excuse by changing the Integrator implementation, so it provides a better example of how it should be done. Signed-off-by: Russell King --- arch/arm/mach-integrator/include/mach/clkdev.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 arch/arm/mach-integrator/include/mach/clkdev.h (limited to 'arch/arm/mach-integrator/include/mach/clkdev.h') diff --git a/arch/arm/mach-integrator/include/mach/clkdev.h b/arch/arm/mach-integrator/include/mach/clkdev.h new file mode 100644 index 00000000000..9293e410832 --- /dev/null +++ b/arch/arm/mach-integrator/include/mach/clkdev.h @@ -0,0 +1,25 @@ +#ifndef __ASM_MACH_CLKDEV_H +#define __ASM_MACH_CLKDEV_H + +#include +#include + +struct clk { + unsigned long rate; + struct module *owner; + const struct icst525_params *params; + void *data; + void (*setvco)(struct clk *, struct icst525_vco vco); +}; + +static inline int __clk_get(struct clk *clk) +{ + return try_module_get(clk->owner); +} + +static inline void __clk_put(struct clk *clk) +{ + module_put(clk->owner); +} + +#endif -- cgit v1.2.3