Lines Matching +full:semi +full:- +full:static
1 // SPDX-License-Identifier: GPL-2.0+
5 // Copyright (c) 2014 Actions Semi Inc.
6 // Author: David Liu <liuwei@actions-semi.com>
11 #include <linux/clk-provider.h>
14 #include "owl-mux.h"
22 regmap_read(common->regmap, mux_hw->reg, ®); in owl_mux_helper_get_parent()
23 parent = reg >> mux_hw->shift; in owl_mux_helper_get_parent()
24 parent &= BIT(mux_hw->width) - 1; in owl_mux_helper_get_parent()
29 static u8 owl_mux_get_parent(struct clk_hw *hw) in owl_mux_get_parent()
33 return owl_mux_helper_get_parent(&mux->common, &mux->mux_hw); in owl_mux_get_parent()
41 regmap_read(common->regmap, mux_hw->reg, ®); in owl_mux_helper_set_parent()
42 reg &= ~GENMASK(mux_hw->width + mux_hw->shift - 1, mux_hw->shift); in owl_mux_helper_set_parent()
43 regmap_write(common->regmap, mux_hw->reg, in owl_mux_helper_set_parent()
44 reg | (index << mux_hw->shift)); in owl_mux_helper_set_parent()
49 static int owl_mux_set_parent(struct clk_hw *hw, u8 index) in owl_mux_set_parent()
53 return owl_mux_helper_set_parent(&mux->common, &mux->mux_hw, index); in owl_mux_set_parent()