Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3587695ybk; Tue, 19 May 2020 08:13:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPqmAbrdaosS3vIA9pZFFFZ9E2P3JjJWCy1QbmzlojYOZNfAREwfBn1F+yi5TIehDV/NXs X-Received: by 2002:a17:906:57c5:: with SMTP id u5mr1031319ejr.419.1589901197247; Tue, 19 May 2020 08:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589901197; cv=none; d=google.com; s=arc-20160816; b=g6HKGj28V9oIA9ZwFCkoeVtmXt9Q4bp+DstPeikJydsDVoVgOb9RGnuYDQJfFASCZl 4r4SPtqQrDJapW6Kmlp7WVLfGGdmy6euDS2nTVwu3pLZVa3LYkAkINydwDNxHFoFqjW/ 57mZfZPMnT5VCaMxe8nKEzT3IKOX38PEIGbFEto/xD5AvfDr5DSfcs8sOKbY4e0YmaKH N5lQbgvPleAIEA7PItDZ3akWLMYKhKjCy0BKvXg4rRA/mj6pgv8BJbKLROJHQMw7ZtnC fOwDPWt2vY6b3gUSJ3mxb5Lr1ibZwyhoZys/PPb+xsq/oVOtnNnCHazi5TdWtp8YKl2r SW6g== 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=fT2nBjKr/CXJzDGGvWkoG2bc58ap+8s/PgzEPhtimoU=; b=JpbhbmZcdIdIqY2zPg7x5kPlrCuuYhfL51l5X0oIJl+jj2cnK6H2udEVfaw+P2CWQf vXTF8cdvvR8ccnRnMeYzGhxbaDwKAJhccsRjuqjmNgRH9M1/H9xOfu33O0U2hUQ0UNBU zEWfWWNfWDnvFT9H36XsyCMURkpTNJv+JgGzkEKJycdHp5uio0Ol4R2OqalkPOnynZsd Rn9OpXZtXkwNLecikavu9axDZgFpwNZ69IWorr8R4EIiA8+tiEfPtz3LCWMbuQPsqJcq QskBFQjHrGWB1ofCzffTLXAqMV+CfIAvbRxxsjRiKgL8blKodpEtmiOv07VQTTrlYfvH OV7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KYO1BVfG; 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 n24si35299ejg.142.2020.05.19.08.12.52; Tue, 19 May 2020 08:13:17 -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=KYO1BVfG; 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 S1729210AbgESPKZ (ORCPT + 99 others); Tue, 19 May 2020 11:10:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:59360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729194AbgESPKY (ORCPT ); Tue, 19 May 2020 11:10:24 -0400 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (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 87492207FB; Tue, 19 May 2020 15:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589901023; bh=cDO81NBWR5JNkUDn06ROcvMZX+vtmK43mTmgDiFGwlQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KYO1BVfG+R7kOpXoOmTAywsE0eiQsXss/NsSSgXJJjE3FHVJ9XnLrnHRjI2nXsvYf j1ys4f0Hr2/RAFw/0wbpP0QBwvnC76RP0kBoHkHzXNeyznPxdLUN6+eRLduEyLs0fv zK+V8OYpIDgB3wCdnBU8d7d9VH9tjhJAzhK1Dtfc= Received: by mail-ej1-f52.google.com with SMTP id s21so12234207ejd.2; Tue, 19 May 2020 08:10:23 -0700 (PDT) X-Gm-Message-State: AOAM530AAiJFq9KvC4ggUKrJbxwe6v9ZeNWMb9XwFuqV3EfelOWAiHt4 F7o8EmxFr5GqEYY5dS6Nj5LQcyM5jhxdHTWOJA== X-Received: by 2002:a17:907:2649:: with SMTP id ar9mr18714534ejc.375.1589901021958; Tue, 19 May 2020 08:10:21 -0700 (PDT) MIME-Version: 1.0 References: <20200518113156.25009-1-matthias.bgg@kernel.org> <20200518113156.25009-3-matthias.bgg@kernel.org> In-Reply-To: <20200518113156.25009-3-matthias.bgg@kernel.org> From: Chun-Kuang Hu Date: Tue, 19 May 2020 23:10:10 +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.bgg@kernel.org Cc: 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 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/mediatek/= 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", 16), > }; > > -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/mtk-= 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_mmsys= _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"? 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_mmsys[= ] =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