1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (c) 2012-2016 Zhang, Keguang <keguang.zhang@gmail.com>
6 #include <linux/clk-provider.h>
7 #include <linux/slab.h>
11 struct clk_hw
*__init
clk_hw_register_pll(struct device
*dev
,
13 const char *parent_name
,
14 const struct clk_ops
*ops
,
19 struct clk_init_data init
;
21 /* allocate the divider */
22 hw
= kzalloc(sizeof(*hw
), GFP_KERNEL
);
24 return ERR_PTR(-ENOMEM
);
29 init
.parent_names
= parent_name
? &parent_name
: NULL
;
30 init
.num_parents
= parent_name
? 1 : 0;
33 /* register the clock */
34 ret
= clk_hw_register(dev
, hw
);