Loading drivers/clk/qcom/clk-regmap-mux.c +2 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * Copyright (c) 2014, 2019, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading Loading @@ -28,7 +28,7 @@ static u8 mux_get_parent(struct clk_hw *hw) val &= mask; if (mux->parent_map) return qcom_find_src_index(hw, mux->parent_map, val); return qcom_find_cfg_index(hw, mux->parent_map, val); return val; } Loading drivers/clk/qcom/common.c +12 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,18 @@ int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src) } EXPORT_SYMBOL_GPL(qcom_find_src_index); int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg) { int i, num_parents = clk_hw_get_num_parents(hw); for (i = 0; i < num_parents; i++) if (cfg == map[i].cfg) return i; return -ENOENT; } EXPORT_SYMBOL(qcom_find_cfg_index); struct regmap * qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc) { Loading drivers/clk/qcom/common.h +3 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2014, 2018, The Linux Foundation. All rights reserved. */ /* Copyright (c) 2014, 2018-2019, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_COMMON_H__ #define __QCOM_CLK_COMMON_H__ Loading Loading @@ -57,6 +57,8 @@ extern void qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count); extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src); extern int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg); extern int qcom_cc_register_board_clk(struct device *dev, const char *path, const char *name, unsigned long rate); Loading Loading
drivers/clk/qcom/clk-regmap-mux.c +2 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014, The Linux Foundation. All rights reserved. * Copyright (c) 2014, 2019, The Linux Foundation. All rights reserved. */ #include <linux/kernel.h> Loading Loading @@ -28,7 +28,7 @@ static u8 mux_get_parent(struct clk_hw *hw) val &= mask; if (mux->parent_map) return qcom_find_src_index(hw, mux->parent_map, val); return qcom_find_cfg_index(hw, mux->parent_map, val); return val; } Loading
drivers/clk/qcom/common.c +12 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,18 @@ int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src) } EXPORT_SYMBOL_GPL(qcom_find_src_index); int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg) { int i, num_parents = clk_hw_get_num_parents(hw); for (i = 0; i < num_parents; i++) if (cfg == map[i].cfg) return i; return -ENOENT; } EXPORT_SYMBOL(qcom_find_cfg_index); struct regmap * qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc) { Loading
drivers/clk/qcom/common.h +3 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2014, 2018, The Linux Foundation. All rights reserved. */ /* Copyright (c) 2014, 2018-2019, The Linux Foundation. All rights reserved. */ #ifndef __QCOM_CLK_COMMON_H__ #define __QCOM_CLK_COMMON_H__ Loading Loading @@ -57,6 +57,8 @@ extern void qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count); extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src); extern int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg); extern int qcom_cc_register_board_clk(struct device *dev, const char *path, const char *name, unsigned long rate); Loading