diff options
author | Yixun Lan <yixun.lan@amlogic.com> | 2018-05-03 15:26:20 +0200 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2018-05-15 14:19:42 +0200 |
commit | 88e2da81241e2ca678b37a194c454888f243914b (patch) | |
tree | 9d565f0875e28d502363fb858607e7561ec8700a /drivers/clk/meson/meson-aoclk.h | |
parent | Merge branch 'next/bindings' into next/drivers (diff) | |
download | linux-88e2da81241e2ca678b37a194c454888f243914b.tar.xz linux-88e2da81241e2ca678b37a194c454888f243914b.zip |
clk: meson: aoclk: refactor common code into dedicated file
We try to refactor the common code into one dedicated file,
while preparing to add new Meson-AXG aoclk driver, this would
help us to better share the code by all aoclk drivers.
Suggested-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Yixun Lan <yixun.lan@amlogic.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/meson-aoclk.h')
-rw-r--r-- | drivers/clk/meson/meson-aoclk.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/clk/meson/meson-aoclk.h b/drivers/clk/meson/meson-aoclk.h new file mode 100644 index 000000000000..ab2819e88922 --- /dev/null +++ b/drivers/clk/meson/meson-aoclk.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ +/* + * Copyright (c) 2017 BayLibre, SAS + * Author: Neil Armstrong <narmstrong@baylibre.com> + * + * Copyright (c) 2018 Amlogic, inc. + * Author: Qiufang Dai <qiufang.dai@amlogic.com> + * Author: Yixun Lan <yixun.lan@amlogic.com> + */ + +#ifndef __MESON_AOCLK_H__ +#define __MESON_AOCLK_H__ + +#include <linux/platform_device.h> +#include <linux/reset-controller.h> +#include "clk-regmap.h" + +struct meson_aoclk_data { + const unsigned int reset_reg; + const int num_reset; + const unsigned int *reset; + int num_clks; + struct clk_regmap **clks; + const struct clk_hw_onecell_data *hw_data; +}; + +struct meson_aoclk_reset_controller { + struct reset_controller_dev reset; + const struct meson_aoclk_data *data; + struct regmap *regmap; +}; + +int meson_aoclkc_probe(struct platform_device *pdev); +#endif |