#include <linux/bits.h>
#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/module.h>
#include <linux/scmi_protocol.h>
#include <asm/div64.h>
#define NOT_ATOMIC …
#define ATOMIC …
enum scmi_clk_feats { … };
#define SCMI_MAX_CLK_OPS …
static const struct scmi_clk_proto_ops *scmi_proto_clk_ops;
struct scmi_clk { … };
#define to_scmi_clk(clk) …
static unsigned long scmi_clk_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{ … }
static long scmi_clk_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate)
{ … }
static int scmi_clk_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ … }
static int scmi_clk_set_parent(struct clk_hw *hw, u8 parent_index)
{ … }
static u8 scmi_clk_get_parent(struct clk_hw *hw)
{ … }
static int scmi_clk_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
{ … }
static int scmi_clk_enable(struct clk_hw *hw)
{ … }
static void scmi_clk_disable(struct clk_hw *hw)
{ … }
static int scmi_clk_atomic_enable(struct clk_hw *hw)
{ … }
static void scmi_clk_atomic_disable(struct clk_hw *hw)
{ … }
static int scmi_clk_atomic_is_enabled(struct clk_hw *hw)
{ … }
static int scmi_clk_get_duty_cycle(struct clk_hw *hw, struct clk_duty *duty)
{ … }
static int scmi_clk_set_duty_cycle(struct clk_hw *hw, struct clk_duty *duty)
{ … }
static int scmi_clk_ops_init(struct device *dev, struct scmi_clk *sclk,
const struct clk_ops *scmi_ops)
{ … }
static const struct clk_ops *
scmi_clk_ops_alloc(struct device *dev, unsigned long feats_key)
{ … }
static const struct clk_ops *
scmi_clk_ops_select(struct scmi_clk *sclk, bool atomic_capable,
unsigned int atomic_threshold_us,
const struct clk_ops **clk_ops_db, size_t db_size)
{ … }
static int scmi_clocks_probe(struct scmi_device *sdev)
{ … }
static const struct scmi_device_id scmi_id_table[] = …;
MODULE_DEVICE_TABLE(scmi, scmi_id_table);
static struct scmi_driver scmi_clocks_driver = …;
module_scmi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;