PageRenderTime 15ms CodeModel.GetById 11ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/arch/arm/mach-nuc93x/clock.h

https://github.com/AICP/kernel_asus_grouper
C Header | 36 lines | 19 code | 6 blank | 11 comment | 0 complexity | bd8a26d24298279e6f403bdddbfc62d2 MD5 | raw file
 1/*
 2 * linux/arch/arm/mach-nuc93x/clock.h
 3 *
 4 * Copyright (c) 2008 Nuvoton technology corporation
 5 *
 6 * Wan ZongShun <mcuos.com@gmail.com>
 7 *
 8 * This program is free software; you can redistribute it and/or modify
 9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License.
11 */
12
13#include <linux/clkdev.h>
14
15void nuc93x_clk_enable(struct clk *clk, int enable);
16void clks_register(struct clk_lookup *clks, size_t num);
17
18struct clk {
19	unsigned long		cken;
20	unsigned int		enabled;
21	void			(*enable)(struct clk *, int enable);
22};
23
24#define DEFINE_CLK(_name, _ctrlbit)			\
25struct clk clk_##_name = {				\
26		.enable	= nuc93x_clk_enable,		\
27		.cken	= (1 << _ctrlbit),		\
28	}
29
30#define DEF_CLKLOOK(_clk, _devname, _conname)		\
31	{						\
32		.clk		= _clk,			\
33		.dev_id		= _devname,		\
34		.con_id		= _conname,		\
35	}
36