2 * Copyright (c) 2012-2016 Zhang, Keguang <keguang.zhang@gmail.com>
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
10 #include <linux/clk-provider.h>
11 #include <linux/slab.h>
13 struct clk_hw *__init clk_hw_register_pll(struct device *dev,
15 const char *parent_name,
16 const struct clk_ops *ops,
21 struct clk_init_data init;
23 /* allocate the divider */
24 hw = kzalloc(sizeof(*hw), GFP_KERNEL);
26 return ERR_PTR(-ENOMEM);
30 init.flags = flags | CLK_IS_BASIC;
31 init.parent_names = (parent_name ? &parent_name : NULL);
32 init.num_parents = (parent_name ? 1 : 0);
35 /* register the clock */
36 ret = clk_hw_register(dev, hw);