mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
clk: Introduce devm_clk_hw_register_gate_parent_data()
Add an API for clock gate that uses parent_data for the parent instead of a string parent_name. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Tested-by: Adam Ford <aford173@gmail.com> #imx8mp-beacon-kit Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Richard Leitner <richard.leitner@skidata.com> Reviewed-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20230301163257.49005-1-marex@denx.de
This commit is contained in:
parent
fe15c26ee2
commit
27fc5ec673
@ -608,6 +608,25 @@ struct clk *clk_register_gate(struct device *dev, const char *name,
|
||||
__devm_clk_hw_register_gate((dev), NULL, (name), (parent_name), NULL, \
|
||||
NULL, (flags), (reg), (bit_idx), \
|
||||
(clk_gate_flags), (lock))
|
||||
|
||||
/**
|
||||
* devm_clk_hw_register_gate - register a gate clock with the clock framework
|
||||
* @dev: device that is registering this clock
|
||||
* @name: name of this clock
|
||||
* @parent_data: parent clk data
|
||||
* @flags: framework-specific flags for this clock
|
||||
* @reg: register address to control gating of this clock
|
||||
* @bit_idx: which bit in the register controls gating of this clock
|
||||
* @clk_gate_flags: gate-specific flags for this clock
|
||||
* @lock: shared register lock for this clock
|
||||
*/
|
||||
#define devm_clk_hw_register_gate_parent_data(dev, name, parent_data, flags, \
|
||||
reg, bit_idx, clk_gate_flags, \
|
||||
lock) \
|
||||
__devm_clk_hw_register_gate((dev), NULL, (name), NULL, NULL, \
|
||||
(parent_data), (flags), (reg), (bit_idx), \
|
||||
(clk_gate_flags), (lock))
|
||||
|
||||
void clk_unregister_gate(struct clk *clk);
|
||||
void clk_hw_unregister_gate(struct clk_hw *hw);
|
||||
int clk_gate_is_enabled(struct clk_hw *hw);
|
||||
|
Loading…
Reference in New Issue
Block a user