#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/scmi_protocol.h>
const struct scmi_clock_info *info;
const struct scmi_handle *handle;
#define to_scmi_clk(clk) container_of(clk, struct scmi_clk, hw)
static unsigned long scmi_clk_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
struct scmi_clk *clk = to_scmi_clk(hw);
ret = clk->handle->clk_ops->rate_get(clk->handle, clk->id, &rate);
static long scmi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate)
struct scmi_clk *clk = to_scmi_clk(hw);
if (clk->info->rate_discrete)
fmin = clk->info->range.min_rate;
fmax = clk->info->range.max_rate;
ftmp += clk->info->range.step_size - 1;
do_div(ftmp, clk->info->range.step_size);