Received: by 10.223.185.116 with SMTP id b49csp3377170wrg; Tue, 13 Feb 2018 01:26:15 -0800 (PST) X-Google-Smtp-Source: AH8x224T+Yi7noAYew3AUm9y9e6K4vdBzBPyFYTDqwDytngnidTZERKl4tlZAg5xrPby1BcKP49s X-Received: by 10.98.253.5 with SMTP id p5mr624588pfh.132.1518513975755; Tue, 13 Feb 2018 01:26:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518513975; cv=none; d=google.com; s=arc-20160816; b=0WYk8HduCoZw6YhP4+EzfLgdZ9VLS6IImiR8yQ13A88UPJwVYA5NZ+qCcTozVrqmvn ykuQ/2TnS/nap5ix+AYYFbhTy5wy+VN7aQqvEd1idcWasFN0YFG4fbRBv8D3e89vGpu1 HWUOscJbr8jKqmtnnGLd6wC6OcrCy37yv2wJhKGJy1JDUtuqHDYeCPJvatOHtXa9KTyG fkuCHyF4K8yMCGIDnqi5PlVO4+MCML5veGp+9D2ccXFv9X5n1bGayaMUWphtR7+HoX6/ h+KlfDs7AJ+l+PM+JXZy/PdP9iY8BD74zR+EebOzBvYQdos2B2nX9jJ3lN/W60hE9/hc 4tPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=J/7pSLOHSAYICtx5xHH+x0lmT9ueIV1Lf8r/M9YEb9U=; b=Z4yswesLZOgsYqOnwt5aHMQfA+eCGXx0m/RLfRJDRIqGbaktU1OZ9X0QsDsZthosqp GNAUoIcaW4lQwb1VpVsenZGujS9MWVPQGh7+j/IVaUrsQiX5VBdabmkzooty3dIy8yxV N8XqaE1lyCn+dEmh9GD/BsC0mi3jlqy/7wSdQAGdhOF6sNxyNkNAHhLVIirTvE4cNOdz ObtXaagLXuLadFzMa1rKFNPUwPXHyseWNfb5nBMU4+FuY4tt3EAk+4yjY3HHIjzFSIEn ZOrNvCXV1Vd6iF7EOPheYoz10rbfuYD+3vOXGexBixyPqVueAFTfJ0PAqi6pJuT9/oDP mPxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o7Yztydh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e27si5616756pfk.256.2018.02.13.01.26.01; Tue, 13 Feb 2018 01:26:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=o7Yztydh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934446AbeBMJZX (ORCPT + 99 others); Tue, 13 Feb 2018 04:25:23 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35453 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933807AbeBMJYv (ORCPT ); Tue, 13 Feb 2018 04:24:51 -0500 Received: by mail-wm0-f67.google.com with SMTP id r78so14774502wme.0; Tue, 13 Feb 2018 01:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=J/7pSLOHSAYICtx5xHH+x0lmT9ueIV1Lf8r/M9YEb9U=; b=o7YztydhqUkyqgEmtf5vN1VYN6add7TBTwuHqwuyoXIbzJTC0lapDgljPkPmz4rN3R cnmUS0+fzE0L549vyZCRLC7ZCEyPyZurxyUWmmfxbvdaWMGdr3pzKnc5dmm967iXft01 9ILE55vbCxrp5tt41LzQKhrtUvb+faCJ9Hga0of2HT3MQ0f4aZT3bCHiEoydWXNoyfI2 H86GyYjBgPJ+ua1V9SA7wxxGzUpe3bVdQ0iPPyPNs5nG8lFiAPF+EU/roh4AcuCO+7Vp nmczs1pYI/tqI+Ks3n9lQx0IJlQhs5S62jEX41dimBxY+6xS7K3yYLEyb9Bfj4TsVDQT on8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=J/7pSLOHSAYICtx5xHH+x0lmT9ueIV1Lf8r/M9YEb9U=; b=FFOsznt+JOR+OGUsGLh4PHRUtKTv9St/HtxkAzobrHtfeyhz0i9fUeWzHVdCjtqagv dcAdEs3IanN4O9qJmj0BJe1kNJ4LOf8FK965tB0sDjgjw2mZzGjhSzs05JfKGJgACRlS R6epmXldfBfULEVYwIY5eDOhn9ZvOSLFgDEK1B87kejOPpXeeOoUpYlIMKyEmp0PO+pq annTSjpUZJqueHGh3fJvmjEIO5cPAk54xydqSasuRBgu1X9a5a3LQ7VCSVGa01IcVCKW 81JeQZZD/KFrCqN9fRQPWiSYLdMsz3ykDdA23zIAvSiettXhZtarc0rtbTDrhAwImdKY SnVg== X-Gm-Message-State: APf1xPCHLa3rHITC2qmHsiBVR6BfINhJPBJbgkJyRT8NRakE9opixQQ2 /L7G99F2oj6DQQCMGUe9QPNE1gsY X-Received: by 10.28.17.17 with SMTP id 17mr720628wmr.123.1518513889525; Tue, 13 Feb 2018 01:24:49 -0800 (PST) Received: from ziggy.stardust ([37.223.138.75]) by smtp.gmail.com with ESMTPSA id p1sm10045877wra.90.2018.02.13.01.24.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 01:24:48 -0800 (PST) Subject: Re: [PATCH v3 2/5] clk: mediatek: modify MT7622 audsys to adapt MFD device To: Ryder Lee , Stephen Boyd , Rob Herring Cc: Mark Brown , Lee Jones , 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 References: From: Matthias Brugger Message-ID: Date: Tue, 13 Feb 2018 10:24:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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); >