mirror of
https://github.com/torvalds/linux.git
synced 2026-08-02 05:12:01 +02:00
clk: qcom: Add clk_regmap_ops
Add ops structure for clk_regmap-specific operations. Change-Id: I230931fc44e5479c1f45b3521bb56b9b22760730 Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
This commit is contained in:
parent
f71ef2aea2
commit
a1635fb5e0
|
|
@ -9,6 +9,23 @@
|
|||
|
||||
struct regmap;
|
||||
|
||||
/**
|
||||
* struct clk_regmap_ops - Operations for clk_regmap.
|
||||
*
|
||||
* @list_registers: Queries the hardware to get the current register contents.
|
||||
* This callback is optional.
|
||||
*
|
||||
* @list_rate: On success, return the nth supported frequency for a given
|
||||
* clock that is below rate_max. Return -ENXIO in case there is
|
||||
* no frequency table.
|
||||
*/
|
||||
struct clk_regmap_ops {
|
||||
void (*list_registers)(struct seq_file *f,
|
||||
struct clk_hw *hw);
|
||||
long (*list_rate)(struct clk_hw *hw, unsigned int n,
|
||||
unsigned long rate_max);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct clk_regmap - regmap supporting clock
|
||||
* @hw: handle between common and hardware-specific interfaces
|
||||
|
|
@ -18,7 +35,9 @@ struct regmap;
|
|||
* @enable_is_inverted: flag to indicate set enable_mask bits to disable
|
||||
* when using clock_enable_regmap and friends APIs.
|
||||
* @vdd_data: struct containing vdd-class data for this clock
|
||||
* @ops: operations this clk_regmap supports
|
||||
*/
|
||||
|
||||
struct clk_regmap {
|
||||
struct clk_hw hw;
|
||||
struct regmap *regmap;
|
||||
|
|
@ -26,6 +45,7 @@ struct clk_regmap {
|
|||
unsigned int enable_mask;
|
||||
bool enable_is_inverted;
|
||||
struct clk_vdd_class_data vdd_data;
|
||||
struct clk_regmap_ops *ops;
|
||||
};
|
||||
|
||||
static inline struct clk_regmap *to_clk_regmap(struct clk_hw *hw)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user