devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Chen-Yu Tsai <wenst@chromium.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Michael Turquette <mturquette@baylibre.com>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Chun-Jie Chen <chun-jie.chen@mediatek.com>,
	Miles Chen <miles.chen@mediatek.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] clk: mediatek: mt8183: Add clk mux notifier for MFG mux
Date: Fri, 20 May 2022 21:27:26 -0700	[thread overview]
Message-ID: <20220521042728.80B92C385A5@smtp.kernel.org> (raw)
In-Reply-To: <20220520094323.754971-5-wenst@chromium.org>

Quoting Chen-Yu Tsai (2022-05-20 02:43:23)
> diff --git a/drivers/clk/mediatek/clk-mt8183.c b/drivers/clk/mediatek/clk-mt8183.c
> index 8a755fadebb5..afef3738396e 100644
> --- a/drivers/clk/mediatek/clk-mt8183.c
> +++ b/drivers/clk/mediatek/clk-mt8183.c
> @@ -1217,6 +1219,25 @@ static int clk_mt8183_top_probe(struct platform_device *pdev)
>         mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
>                 top_clk_data);
>  
> +       /* Register mux notifier for MFG mux */

This comment sort of indicates it should be another function for this
block called "register mfg mux notifier".

> +       mfg_mux_nb = devm_kzalloc(&pdev->dev, sizeof(*mfg_mux_nb), GFP_KERNEL);
> +       if (!mfg_mux_nb)
> +               return -ENOMEM;
> +
> +       for (i = 0; i < ARRAY_SIZE(top_muxes); i++)
> +               if (top_muxes[i].id == CLK_TOP_MUX_MFG)
> +                       break;
> +       if (i == ARRAY_SIZE(top_muxes))
> +               return -EINVAL;
> +
> +       mfg_mux_nb->mux = &top_muxes[i];
> +       mfg_mux_nb->bypass_index = 0; // Bypass to 26M crystal

Use /* these types of comments */

> +       ret = devm_mtk_clk_mux_notifier_register(&pdev->dev,
> +                                                top_clk_data->hws[CLK_TOP_MUX_MFG]->clk,
> +                                                mfg_mux_nb);
> +       if (ret)
> +               return ret;
> +
>         return of_clk_add_hw_provider(node, of_clk_hw_onecell_get,

      reply	other threads:[~2022-05-21  4:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  9:43 [PATCH 0/4] clk: mediatek: mt8183: Fix GPU/MFG clock rate changing Chen-Yu Tsai
2022-05-20  9:43 ` [PATCH 1/4] arm64: dts: mt8183: Fix Mali GPU clock Chen-Yu Tsai
2022-05-20  9:43 ` [PATCH 2/4] clk: mediatek: mt8183: mfgcfg: Propagate rate changes to parent Chen-Yu Tsai
2022-05-20  9:43 ` [PATCH 3/4] clk: mediatek: mux: add clk notifier functions Chen-Yu Tsai
2022-05-20  9:43 ` [PATCH 4/4] clk: mediatek: mt8183: Add clk mux notifier for MFG mux Chen-Yu Tsai
2022-05-21  4:27   ` Stephen Boyd [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220521042728.80B92C385A5@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=chun-jie.chen@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=miles.chen@mediatek.com \
    --cc=mturquette@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).