clk: Changes for v5.5-rc1
Contains a single core API addition that allows clock providers to query the parent index for a given struct clk_hw. This is used to implement suspend/resume support on Tegra SoCs. -----BEGIN PGP SIGNATURE----- iQJHBAABCAAxFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl3Jb7oTHHRyZWRpbmdA bnZpZGlhLmNvbQAKCRDdI6zXfz6zobwFD/9n6FG/cNU6hV1DUE3MES5G3qQmMscq EtuosMU2e+AH/gGgJHN5SxnN+VetczhNouc2ouFH/f+vLat96S8oBOzSdM4qA/F4 yewUkyuSxj5812A3aOUfDukiDqQKEE0rbjTWRCey/bwu1cF9ZTNmSVFUD7+QTdJj MqgeYs9stLNrXZ0We6quXpAklmcxmAOExU8F2ZVxbvfMmaKC42Hi1k9UYRnJGiGh XEOANHsXKcMvvuZyDUVc/ABCVmdd1Jxt7/5O4ITNZQO/8SfsqDOSv2JJvuV1ebGD rPaqv3MQ5O7jbagt+980PDe+q8JNIV8vlUO3txyr+gAqWUOxySjQH67ilzhmsOAi jGAAOCOBPHYl1lKAVZwuGHZ417KnpnReAdL0moQmFyYl2UkibeFxxadEvT5Cv6tw LZsAAXESGzhB0M7upK91UYuRUGjSkhh9gXsn1/He+TCaFFbUoJiEoM3xgtset0Wg gUM64nuijzvzezuwkZCJlD1OogXNhx0cUmq+fVXftKHfkhCOG1LzK//Uy9lSXJtf CcAZGpk5oxZDBjsMkLHUjEk//j01C6uEeH0DV+x0MkImQaT5hIN/n8Pl3BYiC+pa gPGZBWVkSRQBd5I5fyhgh12n5C7rYSq8egd1vEER9tlHgzjaf9eqpSKvbg8MZ94i 5jCcAVTFlS+xww== =SAcT -----END PGP SIGNATURE----- Merge tag 'tegra-for-5.5-clk-core-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-hw-parent-index Pull clk framework change from Thierry Reding: Contains a single core API addition that allows clock providers to query the parent index for a given struct clk_hw. This is used to implement suspend/resume support on Tegra SoCs. * tag 'tegra-for-5.5-clk-core-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: Add API to get index of the clock parent
This commit is contained in:
commit
55ae8a11ee
2 changed files with 19 additions and 0 deletions
|
|
@ -1674,6 +1674,24 @@ static int clk_fetch_parent_index(struct clk_core *core,
|
|||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* clk_hw_get_parent_index - return the index of the parent clock
|
||||
* @hw: clk_hw associated with the clk being consumed
|
||||
*
|
||||
* Fetches and returns the index of parent clock. Returns -EINVAL if the given
|
||||
* clock does not have a current parent.
|
||||
*/
|
||||
int clk_hw_get_parent_index(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_hw *parent = clk_hw_get_parent(hw);
|
||||
|
||||
if (WARN_ON(parent == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
return clk_fetch_parent_index(hw->core, parent->core);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(clk_hw_get_parent_index);
|
||||
|
||||
/*
|
||||
* Update the orphan status of @core and all its children.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -818,6 +818,7 @@ unsigned int clk_hw_get_num_parents(const struct clk_hw *hw);
|
|||
struct clk_hw *clk_hw_get_parent(const struct clk_hw *hw);
|
||||
struct clk_hw *clk_hw_get_parent_by_index(const struct clk_hw *hw,
|
||||
unsigned int index);
|
||||
int clk_hw_get_parent_index(struct clk_hw *hw);
|
||||
int clk_hw_set_parent(struct clk_hw *hw, struct clk_hw *new_parent);
|
||||
unsigned int __clk_get_enable_count(struct clk *clk);
|
||||
unsigned long clk_hw_get_rate(const struct clk_hw *hw);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue