Loading drivers/clk/qcom/clk-voter.c +11 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2017, The Linux Foundation. All rights reserved. * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved. */ #include <linux/clk.h> Loading Loading @@ -126,6 +126,16 @@ static unsigned long voter_clk_recalc_rate(struct clk_hw *hw, return v->rate; } int voter_clk_handoff(struct clk_hw *hw) { struct clk_voter *v = to_clk_voter(hw); v->enabled = true; return 0; } EXPORT_SYMBOL(voter_clk_handoff); const struct clk_ops clk_ops_voter = { .prepare = voter_clk_prepare, .unprepare = voter_clk_unprepare, Loading drivers/clk/qcom/clk-voter.h +4 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2017, The Linux Foundation. All rights reserved. * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_VOTER_H__ Loading @@ -27,6 +27,7 @@ extern const struct clk_ops clk_ops_voter; .hw.init = &(struct clk_init_data){ \ .ops = &clk_ops_voter, \ .name = #clk_name, \ .flags = CLK_ENABLE_HAND_OFF, \ .parent_names = (const char *[]){ #_parent_name }, \ .num_parents = 1, \ }, \ Loading @@ -38,4 +39,6 @@ extern const struct clk_ops clk_ops_voter; #define DEFINE_CLK_BRANCH_VOTER(clk_name, _parent_name) \ __DEFINE_CLK_VOTER(clk_name, _parent_name, 1000, 1) int voter_clk_handoff(struct clk_hw *hw); #endif Loading
drivers/clk/qcom/clk-voter.c +11 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2017, The Linux Foundation. All rights reserved. * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved. */ #include <linux/clk.h> Loading Loading @@ -126,6 +126,16 @@ static unsigned long voter_clk_recalc_rate(struct clk_hw *hw, return v->rate; } int voter_clk_handoff(struct clk_hw *hw) { struct clk_voter *v = to_clk_voter(hw); v->enabled = true; return 0; } EXPORT_SYMBOL(voter_clk_handoff); const struct clk_ops clk_ops_voter = { .prepare = voter_clk_prepare, .unprepare = voter_clk_unprepare, Loading
drivers/clk/qcom/clk-voter.h +4 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2017, The Linux Foundation. All rights reserved. * Copyright (c) 2017, 2019, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_VOTER_H__ Loading @@ -27,6 +27,7 @@ extern const struct clk_ops clk_ops_voter; .hw.init = &(struct clk_init_data){ \ .ops = &clk_ops_voter, \ .name = #clk_name, \ .flags = CLK_ENABLE_HAND_OFF, \ .parent_names = (const char *[]){ #_parent_name }, \ .num_parents = 1, \ }, \ Loading @@ -38,4 +39,6 @@ extern const struct clk_ops clk_ops_voter; #define DEFINE_CLK_BRANCH_VOTER(clk_name, _parent_name) \ __DEFINE_CLK_VOTER(clk_name, _parent_name, 1000, 1) int voter_clk_handoff(struct clk_hw *hw); #endif