1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2016 Maxime Ripard. All rights reserved.
9 #include <linux/clk-provider.h>
11 #include "ccu_common.h"
13 struct ccu_frac_internal
{
17 unsigned long rates
[2];
20 #define _SUNXI_CCU_FRAC(_enable, _select, _rate1, _rate2) \
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
,
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_ */