[RFC PATCH] reset: mediatek: Move mediatek system clock reset to reset folder
Stephen Boyd
sboyd at kernel.org
Wed Jun 15 19:00:17 PDT 2022
Quoting Bo-Chen Chen (2022-05-27 02:03:55)
> diff --git a/drivers/clk/mediatek/clk-mt2701-eth.c b/drivers/clk/mediatek/clk-mt2701-eth.c
> index edf1e2ed2b59..84ea1591257e 100644
> --- a/drivers/clk/mediatek/clk-mt2701-eth.c
> +++ b/drivers/clk/mediatek/clk-mt2701-eth.c
> @@ -36,14 +36,6 @@ static const struct mtk_gate eth_clks[] = {
> GATE_ETH(CLK_ETHSYS_CRYPTO, "crypto_clk", "ethif_sel", 29),
> };
>
> -static u16 rst_ofs[] = { 0x34, };
> -
> -static const struct mtk_clk_rst_desc clk_rst_desc = {
> - .version = MTK_RST_SIMPLE,
> - .rst_bank_ofs = rst_ofs,
> - .rst_bank_nr = ARRAY_SIZE(rst_ofs),
> -};
> -
> static const struct of_device_id of_match_clk_mt2701_eth[] = {
> { .compatible = "mediatek,mt2701-ethsys", },
> {}
> @@ -66,7 +58,7 @@ static int clk_mt2701_eth_probe(struct platform_device *pdev)
> "could not register clock provider: %s: %d\n",
> pdev->name, r);
>
> - mtk_register_reset_controller_with_dev(&pdev->dev, &clk_rst_desc);
> + mtk_rst_init(&pdev->dev, node, "mt2701-eth-rst");
Instead of making direct calls, please use the auxiliary bus and create
full fledged devices that are probed through the driver core. That way
we can see the relationship in sysfs between devices and they're "real"
device drivers for the reset component of the device.
More information about the linux-arm-kernel
mailing list