val = divider_get_val(rate, parent_rate, cd->div.table, cd->div.width,
#include <linux/clk-provider.h>
static unsigned long ccu_div_round_rate(struct ccu_mux_internal *mux,
unsigned long *parent_rate,
struct ccu_div *cd = data;
if (cd->common.features & CCU_FEATURE_FIXED_POSTDIV)
rate *= cd->fixed_post_div;
rate = divider_round_rate_parent(&cd->common.hw, parent,
cd->div.table, cd->div.width,
if (cd->common.features & CCU_FEATURE_FIXED_POSTDIV)
rate /= cd->fixed_post_div;
static void ccu_div_disable(struct clk_hw *hw)
struct ccu_div *cd = hw_to_ccu_div(hw);
return ccu_gate_helper_disable(&cd->common, cd->enable);
static int ccu_div_enable(struct clk_hw *hw)
struct ccu_div *cd = hw_to_ccu_div(hw);
return ccu_gate_helper_enable(&cd->common, cd->enable);
static int ccu_div_is_enabled(struct clk_hw *hw)
struct ccu_div *cd = hw_to_ccu_div(hw);
return ccu_gate_helper_is_enabled(&cd->common, cd->enable);
static unsigned long ccu_div_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
struct ccu_div *cd = hw_to_ccu_div(hw);