Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: actions: Add fixed factor clock support

Add support for Actions Semi fixed factor clock reusing the clk
ops from common clock driver.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Manivannan Sadhasivam and committed by
Stephen Boyd
c5351964 4bb78fc9

+28
+28
drivers/clk/actions/owl-fixed-factor.h
··· 1 + // SPDX-License-Identifier: GPL-2.0+ 2 + // 3 + // OWL fixed factor clock driver 4 + // 5 + // Copyright (c) 2014 Actions Semi Inc. 6 + // Author: David Liu <liuwei@actions-semi.com> 7 + // 8 + // Copyright (c) 2018 Linaro Ltd. 9 + // Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 10 + 11 + #ifndef _OWL_FIXED_FACTOR_H_ 12 + #define _OWL_FIXED_FACTOR_H_ 13 + 14 + #include "owl-common.h" 15 + 16 + #define OWL_FIX_FACT(_struct, _name, _parent, _mul, _div, _flags) \ 17 + struct clk_fixed_factor _struct = { \ 18 + .mult = _mul, \ 19 + .div = _div, \ 20 + .hw.init = CLK_HW_INIT(_name, \ 21 + _parent, \ 22 + &clk_fixed_factor_ops, \ 23 + _flags), \ 24 + } 25 + 26 + extern const struct clk_ops clk_fixed_factor_ops; 27 + 28 + #endif /* _OWL_FIXED_FACTOR_H_ */