Lines Matching +full:invert +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/clk-provider.h>
14 #include "clk-branch.h"
20 if (!br->hwcg_reg) in clk_branch_in_hwcg_mode()
23 regmap_read(br->clkr.regmap, br->hwcg_reg, &val); in clk_branch_in_hwcg_mode()
25 return !!(val & BIT(br->hwcg_bit)); in clk_branch_in_hwcg_mode()
30 bool invert = (br->halt_check == BRANCH_HALT_ENABLE); in clk_branch_check_halt() local
33 regmap_read(br->clkr.regmap, br->halt_reg, &val); in clk_branch_check_halt()
35 val &= BIT(br->halt_bit); in clk_branch_check_halt()
36 if (invert) in clk_branch_check_halt()
55 regmap_read(br->clkr.regmap, br->halt_reg, &val); in clk_branch2_check_halt()
69 bool voted = br->halt_check & BRANCH_VOTED; in clk_branch_wait()
70 const char *name = clk_hw_get_name(&br->clkr.hw); in clk_branch_wait()
76 if (br->halt_check == BRANCH_HALT_SKIP || clk_branch_in_hwcg_mode(br)) in clk_branch_wait()
79 if (br->halt_check == BRANCH_HALT_DELAY || (!enabling && voted)) { in clk_branch_wait()
81 } else if (br->halt_check == BRANCH_HALT_ENABLE || in clk_branch_wait()
82 br->halt_check == BRANCH_HALT || in clk_branch_wait()
86 while (count-- > 0) { in clk_branch_wait()
93 return -EBUSY; in clk_branch_wait()
126 .enable = clk_branch_enable,
143 .enable = clk_branch2_enable,
150 .enable = clk_branch2_enable,
156 .enable = clk_enable_regmap,