Skip to content

Commit

Permalink
clk: actions: Add fixed factor clock support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Manivannan Sadhasivam authored and Stephen Boyd committed Apr 6, 2018
1 parent 4bb78fc commit c535196
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions drivers/clk/actions/owl-fixed-factor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// SPDX-License-Identifier: GPL-2.0+
//
// OWL fixed factor clock driver
//
// Copyright (c) 2014 Actions Semi Inc.
// Author: David Liu <liuwei@actions-semi.com>
//
// Copyright (c) 2018 Linaro Ltd.
// Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

#ifndef _OWL_FIXED_FACTOR_H_
#define _OWL_FIXED_FACTOR_H_

#include "owl-common.h"

#define OWL_FIX_FACT(_struct, _name, _parent, _mul, _div, _flags) \
struct clk_fixed_factor _struct = { \
.mult = _mul, \
.div = _div, \
.hw.init = CLK_HW_INIT(_name, \
_parent, \
&clk_fixed_factor_ops, \
_flags), \
}

extern const struct clk_ops clk_fixed_factor_ops;

#endif /* _OWL_FIXED_FACTOR_H_ */

0 comments on commit c535196

Please sign in to comment.