Lines Matching +full:sm8250 +full:- +full:lpass +full:- +full:aoncc
1 // SPDX-License-Identifier: GPL-2.0
3 * LPASS Audio CC and Always ON CC Glitch Free Mux clock driver
11 #include <linux/clk-provider.h>
20 #include <dt-bindings/clock/qcom,sm8250-lpass-audiocc.h>
21 #include <dt-bindings/clock/qcom,sm8250-lpass-aoncc.h>
42 return readl(clk->gfm_mux) & clk->mux_mask; in clk_gfm_get_parent()
50 val = readl(clk->gfm_mux); in clk_gfm_set_parent()
53 val |= clk->mux_mask; in clk_gfm_set_parent()
55 val &= ~clk->mux_mask; in clk_gfm_set_parent()
58 writel(val, clk->gfm_mux); in clk_gfm_set_parent()
237 struct device *dev = &pdev->dev; in lpass_gfm_clk_driver_probe()
244 return -EINVAL; in lpass_gfm_clk_driver_probe()
248 return -ENOMEM; in lpass_gfm_clk_driver_probe()
250 cc->base = devm_platform_ioremap_resource(pdev, 0); in lpass_gfm_clk_driver_probe()
251 if (IS_ERR(cc->base)) in lpass_gfm_clk_driver_probe()
252 return PTR_ERR(cc->base); in lpass_gfm_clk_driver_probe()
264 dev_dbg(dev, "Failed to get lpass core voting clocks\n"); in lpass_gfm_clk_driver_probe()
268 for (i = 0; i < data->onecell_data->num; i++) { in lpass_gfm_clk_driver_probe()
269 if (!data->gfm_clks[i]) in lpass_gfm_clk_driver_probe()
272 gfm = data->gfm_clks[i]; in lpass_gfm_clk_driver_probe()
273 gfm->priv = cc; in lpass_gfm_clk_driver_probe()
274 gfm->gfm_mux = cc->base; in lpass_gfm_clk_driver_probe()
275 gfm->gfm_mux = gfm->gfm_mux + data->gfm_clks[i]->mux_reg; in lpass_gfm_clk_driver_probe()
277 err = devm_clk_hw_register(dev, &data->gfm_clks[i]->hw); in lpass_gfm_clk_driver_probe()
284 data->onecell_data); in lpass_gfm_clk_driver_probe()
293 .compatible = "qcom,sm8250-lpass-aoncc",
297 .compatible = "qcom,sm8250-lpass-audiocc",
311 .name = "lpass-gfm-clk",
318 MODULE_DESCRIPTION("QTI SM8250 LPASS Glitch Free Mux clock driver");