Lines Matching +full:axxia +full:- +full:clock

1 // SPDX-License-Identifier: GPL-2.0-only
3 * drivers/clk/clk-axm5516.c
5 * Provides clock implementations for three different types of clock devices on
6 * the Axxia device: PLL clock, a clock divider and a clock mux.
16 #include <linux/clk-provider.h>
18 #include <dt-bindings/clock/lsi,axm5516-clks.h>
22 * struct axxia_clk - Common struct to all Axxia clocks.
24 * @regmap: Regmap for the clock control registers
33 * struct axxia_pllclk - Axxia PLL generated clock.
44 * axxia_pllclk_recalc - Calculate the PLL generated clock rate given the
45 * parent clock rate.
55 regmap_read(aclk->regmap, pll->reg, &control); in axxia_pllclk_recalc()
69 * struct axxia_divclk - Axxia clock divider
84 * axxia_divclk_recalc_rate - Calculate clock divider output rage
93 regmap_read(aclk->regmap, divclk->reg, &ctrl); in axxia_divclk_recalc_rate()
94 div = 1 + ((ctrl >> divclk->shift) & ((1 << divclk->width)-1)); in axxia_divclk_recalc_rate()
104 * struct axxia_clkmux - Axxia clock mux
119 * axxia_clkmux_get_parent - Return the index of selected parent clock
127 regmap_read(aclk->regmap, mux->reg, &ctrl); in axxia_clkmux_get_parent()
128 parent = (ctrl >> mux->shift) & ((1 << mux->width) - 1); in axxia_clkmux_get_parent()
203 * Clock dividers
333 * Clock MUXes
485 /* Table of all supported clocks indexed by the clock identifiers from the
517 unsigned int idx = clkspec->args[0]; in of_clk_axmclk_get()
521 return ERR_PTR(-EINVAL); in of_clk_axmclk_get()
524 return &axmclk_clocks[idx]->hw; in of_clk_axmclk_get()
536 { .compatible = "lsi,axm5516-clks" },
545 struct device *dev = &pdev->dev; in axmclk_probe()
560 /* Update each entry with the allocated regmap and register the clock in axmclk_probe()
561 * with the common clock framework in axmclk_probe()
564 axmclk_clocks[i]->regmap = regmap; in axmclk_probe()
565 ret = devm_clk_hw_register(dev, &axmclk_clocks[i]->hw); in axmclk_probe()
576 .name = "clk-axm5516",
593 MODULE_DESCRIPTION("AXM5516 clock driver");
595 MODULE_ALIAS("platform:clk-axm5516");