Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp108186ybk; Tue, 19 May 2020 16:54:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4Z6dAylRdhUGnDUxRss0Huq1tar5PLyV8BZXpyUMMz6ntzVJUjXzxr6H/FZS7T3bDCNn+ X-Received: by 2002:a17:906:8556:: with SMTP id h22mr1569920ejy.535.1589932462807; Tue, 19 May 2020 16:54:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589932462; cv=none; d=google.com; s=arc-20160816; b=WjyZ+QDuSho80oB8sD9aIp0G2VzQ72Xf4WFu0BQf4HOG9I0/r7kq/OZczSht8A3Fg7 y3FvkfZDKKt9prRg8UpimI0BZ1ZaOxbiI30kvtzOpc/u6MC4WHufrBPYY34MKaTHgaKJ RlPxU/DYP8Jf6P2S9yp9Pkt3YTeaUqnXg0Gea0SrxwNCL3HDV0BltfHmn6DOnLOMZCR8 VFR8pJIQfvOkSf65K+5D5zMCd0vmkF8x64sFX66FIu9uOzakDpnHyfD5+NwCBr5cbtO4 HRaxtKYgrBkdsZfWKLU1T48fE03zHPtahb5sBWzABYAbnuF1POHPjG0rkYCHLUou+WGP OJvQ== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Y8wwbDFi53gRKxudRCQmVgDSz4XK1vHUn1RdB9IV2/0=; b=ELGi0f18jXwjNRJmIoD4tOdHvQ8e55PhcJEZG5CttygTw6fqwgbjiVyY+Rfa2lLTJK /GGS+MeolTJFwNVdBAV/E/uvTRZmTafnDNQj4AHNwK+7z2w6v6b0D73+QMSN7Gb+jjNk d8gSQskrn5+pJOPRZV2qzcOfrSVhyj0OOXqs1CLy8PBJRL2nG0B8XBWpZ6flxvNcMRER F/WBN7PIDmhYwrl7CW2j4bf5qOsyxJZvoe1BMmOiJqDBFH+36cHHQawygzpO6kVDY3Zy Sa/FNS/8jLCL6CVCgc4WTn1aMn8LKAXAyHgEdbzn97DB8frchLWOsMv7c6jWwMZ2Gp7Y Gohg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uORF1Inm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p59si520589edd.241.2020.05.19.16.53.48; Tue, 19 May 2020 16:54:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uORF1Inm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726938AbgESXwU (ORCPT + 99 others); Tue, 19 May 2020 19:52:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:47842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgESXwU (ORCPT ); Tue, 19 May 2020 19:52:20 -0400 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D55EC20825; Tue, 19 May 2020 23:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589932339; bh=OWt0CaD4Fsfw5siM0y6++CUzVEtsGrAx7EDLibWsgWo=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uORF1InmUjSKZcuPCDnZOzdo8NwdP/wvwP56Tx9AFtNogyil+/J32dElpEfXwnRzY ANI5GiQyZ5bhMuRFcxkSo0oa7ffh+qS7mUlGM5tZaVPYxFFuGISChy2xxXAc/qZEmv C/JNe7TJUBeE6PWjNcmVHfBKOGADlfBzyiChf/8U= Received: by mail-ej1-f42.google.com with SMTP id a2so1058732ejb.10; Tue, 19 May 2020 16:52:18 -0700 (PDT) X-Gm-Message-State: AOAM531wUlugvWgkXa9E7tTDgNqAI3Kg8tpjzafTTUuuFYJQONAEyvwS F+/aFNplBobS1Qyb243LgSBvn4auk4iJYS0gWA== X-Received: by 2002:a17:906:abce:: with SMTP id kq14mr1448685ejb.187.1589932337214; Tue, 19 May 2020 16:52:17 -0700 (PDT) MIME-Version: 1.0 References: <20200518113156.25009-1-matthias.bgg@kernel.org> <20200518113156.25009-3-matthias.bgg@kernel.org> <3a8b3846-c399-2193-a203-8707d693dad8@suse.com> In-Reply-To: <3a8b3846-c399-2193-a203-8707d693dad8@suse.com> From: Chun-Kuang Hu Date: Wed, 20 May 2020 07:52:05 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/4] clk/soc: mediatek: mt6779: Bind clock driver from platform device To: Matthias Brugger Cc: Chun-Kuang Hu , matthias.bgg@kernel.org, Rob Herring , Matthias Brugger , Michael Turquette , Stephen Boyd , Kate Stewart , devicetree@vger.kernel.org, Greg Kroah-Hartman , linux-kernel , "moderated list:ARM/Mediatek SoC support" , Linux ARM , mtk01761 , Thomas Gleixner , linux-clk@vger.kernel.org, Allison Randal Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthias Brugger =E6=96=BC 2020=E5=B9=B45=E6=9C=8820=E6= =97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8A=E5=8D=885:26=E5=AF=AB=E9=81=93=EF=BC=9A > > > > On 19/05/2020 17:10, Chun-Kuang Hu wrote: > > Hi, Matthias: > > > > =E6=96=BC 2020=E5=B9=B45=E6=9C=8818=E6=97=A5 = =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=887:33=E5=AF=AB=E9=81=93=EF=BC=9A > >> > >> From: Matthias Brugger > >> > >> The mmsys driver is now the top level entry point for the multimedia > >> system (mmsys), we bind the clock driver by creating a platform device= . > >> We also bind the MediaTek DRM driver which is not yet implement and > >> therefor will errror out for now. > >> > >> Signed-off-by: Matthias Brugger > >> --- > >> > >> drivers/clk/mediatek/clk-mt6779-mm.c | 9 ++------- > >> drivers/soc/mediatek/mtk-mmsys.c | 8 ++++++++ > >> 2 files changed, 10 insertions(+), 7 deletions(-) > >> > >> diff --git a/drivers/clk/mediatek/clk-mt6779-mm.c b/drivers/clk/mediat= ek/clk-mt6779-mm.c > >> index fb5fbb8e3e41..059c1a41ac7a 100644 > >> --- a/drivers/clk/mediatek/clk-mt6779-mm.c > >> +++ b/drivers/clk/mediatek/clk-mt6779-mm.c > >> @@ -84,15 +84,11 @@ static const struct mtk_gate mm_clks[] =3D { > >> GATE_MM1(CLK_MM_DISP_OVL_FBDC, "mm_disp_ovl_fbdc", "mm_sel", 1= 6), > >> }; > >> > >> -static const struct of_device_id of_match_clk_mt6779_mm[] =3D { > >> - { .compatible =3D "mediatek,mt6779-mmsys", }, > >> - {} > >> -}; > >> - > >> static int clk_mt6779_mm_probe(struct platform_device *pdev) > >> { > >> + struct device *dev =3D &pdev->dev; > >> + struct device_node *node =3D dev->parent->of_node; > >> struct clk_onecell_data *clk_data; > >> - struct device_node *node =3D pdev->dev.of_node; > >> > >> clk_data =3D mtk_alloc_clk_data(CLK_MM_NR_CLK); > >> > >> @@ -106,7 +102,6 @@ static struct platform_driver clk_mt6779_mm_drv = =3D { > >> .probe =3D clk_mt6779_mm_probe, > >> .driver =3D { > >> .name =3D "clk-mt6779-mm", > >> - .of_match_table =3D of_match_clk_mt6779_mm, > >> }, > >> }; > >> > >> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/m= tk-mmsys.c > >> index fee64c8d3020..dc15808cf3a3 100644 > >> --- a/drivers/soc/mediatek/mtk-mmsys.c > >> +++ b/drivers/soc/mediatek/mtk-mmsys.c > >> @@ -88,6 +88,10 @@ static const struct mtk_mmsys_driver_data mt2712_mm= sys_driver_data =3D { > >> .clk_driver =3D "clk-mt2712-mm", > >> }; > >> > >> +static const struct mtk_mmsys_driver_data mt6779_mmsys_driver_data = =3D { > >> + .clk_driver =3D "clk-mt6779-mm", > > > > This patch looks good to me, but I've one question: why drm driver > > just use single "mediatek-drm" for sub driver name, but clock driver > > has different name for each SoC? > > Could we just use single name for clock driver such as "mediatek-clk-mm= "? > > Because the DRM for all SoCs are handled in the same driver, while we hav= e a > different clock drivers for each SoC. So we need to specify which clock d= river > we want to load. > > If we want to change that, we would need to refactor heavily the clock dr= ivers > for all MediaTek SoCs. I don't think it's worth the effort. > OK, so for this patch, Reviewed-by: Chun-Kuang Hu > Regards, > Matthias > > > > > Regards, > > Chun-Kuang. > > > >> +}; > >> + > >> static const struct mtk_mmsys_driver_data mt6797_mmsys_driver_data = =3D { > >> .clk_driver =3D "clk-mt6797-mm", > >> }; > >> @@ -343,6 +347,10 @@ static const struct of_device_id of_match_mtk_mms= ys[] =3D { > >> .compatible =3D "mediatek,mt2712-mmsys", > >> .data =3D &mt2712_mmsys_driver_data, > >> }, > >> + { > >> + .compatible =3D "mediatek,mt6779-mmsys", > >> + .data =3D &mt6779_mmsys_driver_data, > >> + }, > >> { > >> .compatible =3D "mediatek,mt6797-mmsys", > >> .data =3D &mt6797_mmsys_driver_data, > >> -- > >> 2.26.2 > >> > >> > >> _______________________________________________ > >> Linux-mediatek mailing list > >> Linux-mediatek@lists.infradead.org > >> http://lists.infradead.org/mailman/listinfo/linux-mediatek