mtd: no need to check return value of debugfs_create functions
[linux/fpc-iii.git] / drivers / clk / sunxi-ng / ccu_frac.h
bloba4e8d7d0eae85388564c93156ac66e2f98e0d54f
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (c) 2016 Maxime Ripard. All rights reserved.
4 */
6 #ifndef _CCU_FRAC_H_
7 #define _CCU_FRAC_H_
9 #include <linux/clk-provider.h>
11 #include "ccu_common.h"
13 struct ccu_frac_internal {
14 u32 enable;
15 u32 select;
17 unsigned long rates[2];
20 #define _SUNXI_CCU_FRAC(_enable, _select, _rate1, _rate2) \
21 { \
22 .enable = _enable, \
23 .select = _select, \
24 .rates = { _rate1, _rate2 }, \
27 bool ccu_frac_helper_is_enabled(struct ccu_common *common,
28 struct ccu_frac_internal *cf);
29 void ccu_frac_helper_enable(struct ccu_common *common,
30 struct ccu_frac_internal *cf);
31 void ccu_frac_helper_disable(struct ccu_common *common,
32 struct ccu_frac_internal *cf);
34 bool ccu_frac_helper_has_rate(struct ccu_common *common,
35 struct ccu_frac_internal *cf,
36 unsigned long rate);
38 unsigned long ccu_frac_helper_read_rate(struct ccu_common *common,
39 struct ccu_frac_internal *cf);
41 int ccu_frac_helper_set_rate(struct ccu_common *common,
42 struct ccu_frac_internal *cf,
43 unsigned long rate, u32 lock);
45 #endif /* _CCU_FRAC_H_ */