From a8aceccb4d5db0acb476b74051525fb26f57f8ae Mon Sep 17 00:00:00 2001 From: Tero Kristo Date: Thu, 18 Jul 2013 11:52:33 +0300 Subject: CLK: TI: add DT alias clock registration mechanism Some devices require their clocks to be available with a specific dev-id con-id mapping. With DT, the clocks can be found by default only with their name, or alternatively through the device node of the consumer. With drivers, that don't support DT fully yet, add mechanism to register specific clock names. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren Signed-off-by: Mike Turquette --- include/linux/clk/ti.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 include/linux/clk/ti.h (limited to 'include') diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h new file mode 100644 index 00000000000..df94c243205 --- /dev/null +++ b/include/linux/clk/ti.h @@ -0,0 +1,42 @@ +/* + * TI clock drivers support + * + * Copyright (C) 2013 Texas Instruments, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#ifndef __LINUX_CLK_TI_H__ +#define __LINUX_CLK_TI_H__ + +#include + +/** + * struct ti_dt_clk - OMAP DT clock alias declarations + * @lk: clock lookup definition + * @node_name: clock DT node to map to + */ +struct ti_dt_clk { + struct clk_lookup lk; + char *node_name; +}; + +#define DT_CLK(dev, con, name) \ + { \ + .lk = { \ + .dev_id = dev, \ + .con_id = con, \ + }, \ + .node_name = name, \ + } + + +void ti_dt_clocks_register(struct ti_dt_clk *oclks); + +#endif -- cgit v1.2.3-18-g5258