devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg@gmail.com>
To: Ryder Lee <ryder.lee@mediatek.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>
Cc: Mark Brown <broonie@kernel.org>, Lee Jones <lee.jones@linaro.org>,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-clk@vger.kernel.org,
	Garlic Tseng <garlic.tseng@mediatek.com>
Subject: Re: [PATCH v3 2/5] clk: mediatek: modify MT7622 audsys to adapt MFD device
Date: Tue, 13 Feb 2018 10:24:47 +0100	[thread overview]
Message-ID: <cb75cdaa-eb84-d01e-60bd-21a928ddc090@gmail.com> (raw)
In-Reply-To: <f8e87179bd7700130e294393592719fac8590c59.1518424204.git.ryder.lee@mediatek.com>



On 02/12/2018 12:28 PM, Ryder Lee wrote:
> As the new MFD device is in place, switch probing method to adapt it.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> ---
>  drivers/clk/mediatek/clk-mt7622-aud.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/mediatek/clk-mt7622-aud.c b/drivers/clk/mediatek/clk-mt7622-aud.c
> index 13f752d..68c52a9 100644
> --- a/drivers/clk/mediatek/clk-mt7622-aud.c
> +++ b/drivers/clk/mediatek/clk-mt7622-aud.c
> @@ -142,11 +142,16 @@ static int clk_mt7622_audiosys_init(struct platform_device *pdev)
>  {
>  	struct clk_onecell_data *clk_data;
>  	struct device_node *node = pdev->dev.of_node;
> +	struct device_node *pnode = pdev->dev.parent->of_node;
>  	int r;
>  
>  	clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
>  
> -	mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
> +	/* Check if called from MFD */
> +	if (!pnode)
> +		pnode = node;

This is needed for backwards compatibility, correct?
Please change the comment accordingly. The same holds for mt2701 driver.

Thanks,
Matthias

> +
> +	mtk_clk_register_gates(pnode, audio_clks, ARRAY_SIZE(audio_clks),
>  			       clk_data);
>  
>  	r = of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
> 

  reply	other threads:[~2018-02-13  9:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 11:28 [PATCH v3 0/5] switch to MFD device for MediaTek audio subsystem Ryder Lee
     [not found] ` <cover.1518424204.git.ryder.lee-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-02-12 11:28   ` [PATCH v3 1/5] clk: mediatek: update missing clock data for MT7622 audsys Ryder Lee
2018-02-13  9:13     ` Matthias Brugger
2018-02-12 11:28   ` [PATCH v3 2/5] clk: mediatek: modify MT7622 audsys to adapt MFD device Ryder Lee
2018-02-13  9:24     ` Matthias Brugger [this message]
2018-02-12 11:28   ` [PATCH v3 3/5] clk: mediatek: add audsys support for MT2701 Ryder Lee
2018-02-12 11:28 ` [PATCH v3 4/5] dt-bindings: clock: mediatek: update audsys documentation to adapt MFD device Ryder Lee
2018-02-19 18:29   ` Rob Herring
2018-02-21  6:04     ` [SPAM]Re: " Ryder Lee
2018-02-21 14:10       ` Rob Herring
2018-02-22  4:14         ` Ryder Lee
2018-02-28 15:13           ` Rob Herring
     [not found]             ` <CAL_Jsq+NK-sUY-qOZ2Xv1ZfWVm-vG0tyAgN_auKeaQxMq58vkw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-02-28 17:58               ` Sean Wang
2018-03-05  9:23             ` Ryder Lee
2018-02-12 11:28 ` [PATCH v3 5/5] arm: dts: mediatek: add audio-subsystem node for both MT2701 and MT7623 Ryder Lee

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=cb75cdaa-eb84-d01e-60bd-21a928ddc090@gmail.com \
    --to=matthias.bgg@gmail.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=garlic.tseng@mediatek.com \
    --cc=lee.jones@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=robh+dt@kernel.org \
    --cc=ryder.lee@mediatek.com \
    --cc=sboyd@codeaurora.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).