Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: meson: remove ee input bypass clocks

During probe, bypass clocks (i.e. ee-in-xtal) are made from device-tree
inputs to provide input clocks which can be access through global name.
The cons of this method are the duplicated clocks, means more string
comparison.

Specify parent directly with device-tree clock name.

Remove the bypass clock registration from the ee probe function.

Signed-off-by: Alexandre Mergnat <amergnat@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

authored by

Alexandre Mergnat and committed by
Jerome Brunet
b11cfaba 3a36044e

-13
-1
drivers/clk/meson/Kconfig
··· 38 38 config COMMON_CLK_MESON_EE_CLKC 39 39 tristate 40 40 select COMMON_CLK_MESON_REGMAP 41 - select COMMON_CLK_MESON_INPUT 42 41 43 42 config COMMON_CLK_MESON8B 44 43 bool
-10
drivers/clk/meson/meson-eeclk.c
··· 10 10 #include <linux/mfd/syscon.h> 11 11 #include <linux/regmap.h> 12 12 13 - #include "clk-input.h" 14 13 #include "clk-regmap.h" 15 14 #include "meson-eeclk.h" 16 15 ··· 17 18 { 18 19 const struct meson_eeclkc_data *data; 19 20 struct device *dev = &pdev->dev; 20 - struct clk_hw *input; 21 21 struct regmap *map; 22 22 int ret, i; 23 23 ··· 34 36 35 37 if (data->init_count) 36 38 regmap_multi_reg_write(map, data->init_regs, data->init_count); 37 - 38 - input = meson_clk_hw_register_input(dev, "xtal", IN_PREFIX "xtal", 0); 39 - if (IS_ERR(input)) { 40 - ret = PTR_ERR(input); 41 - if (ret != -EPROBE_DEFER) 42 - dev_err(dev, "failed to get input clock"); 43 - return ret; 44 - } 45 39 46 40 /* Populate regmap for the regmap backed clocks */ 47 41 for (i = 0; i < data->regmap_clk_num; i++)
-2
drivers/clk/meson/meson-eeclk.h
··· 10 10 #include <linux/clk-provider.h> 11 11 #include "clk-regmap.h" 12 12 13 - #define IN_PREFIX "ee-in-" 14 - 15 13 struct platform_device; 16 14 17 15 struct meson_eeclkc_data {