clk: meson: remove ee input bypass clocks
authorAlexandre Mergnat <amergnat@baylibre.com>
Thu, 25 Jul 2019 16:42:37 +0000 (18:42 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Mon, 29 Jul 2019 10:42:49 +0000 (12:42 +0200)
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>
drivers/clk/meson/Kconfig
drivers/clk/meson/meson-eeclk.c
drivers/clk/meson/meson-eeclk.h

index 178ee72..72a3757 100644 (file)
@@ -38,7 +38,6 @@ config COMMON_CLK_MESON_AO_CLKC
 config COMMON_CLK_MESON_EE_CLKC
        tristate
        select COMMON_CLK_MESON_REGMAP
-       select COMMON_CLK_MESON_INPUT
 
 config COMMON_CLK_MESON8B
        bool
index 6ba2094..a7cb1e7 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/mfd/syscon.h>
 #include <linux/regmap.h>
 
-#include "clk-input.h"
 #include "clk-regmap.h"
 #include "meson-eeclk.h"
 
@@ -18,7 +17,6 @@ int meson_eeclkc_probe(struct platform_device *pdev)
 {
        const struct meson_eeclkc_data *data;
        struct device *dev = &pdev->dev;
-       struct clk_hw *input;
        struct regmap *map;
        int ret, i;
 
@@ -37,14 +35,6 @@ int meson_eeclkc_probe(struct platform_device *pdev)
        if (data->init_count)
                regmap_multi_reg_write(map, data->init_regs, data->init_count);
 
-       input = meson_clk_hw_register_input(dev, "xtal", IN_PREFIX "xtal", 0);
-       if (IS_ERR(input)) {
-               ret = PTR_ERR(input);
-               if (ret != -EPROBE_DEFER)
-                       dev_err(dev, "failed to get input clock");
-               return ret;
-       }
-
        /* Populate regmap for the regmap backed clocks */
        for (i = 0; i < data->regmap_clk_num; i++)
                data->regmap_clks[i]->map = map;
index 9ab5d6f..7731620 100644 (file)
@@ -10,8 +10,6 @@
 #include <linux/clk-provider.h>
 #include "clk-regmap.h"
 
-#define IN_PREFIX "ee-in-"
-
 struct platform_device;
 
 struct meson_eeclkc_data {