Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1601940imm; Wed, 23 May 2018 20:23:24 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrBd6F+Moo8Ba8Xky8lLbaqsUhkB8VpOkw8yvpv9Zyt65IPqiL+oUT9HCdgDhFXJ0u09Tqm X-Received: by 2002:a62:91b:: with SMTP id e27-v6mr5400299pfd.93.1527132204171; Wed, 23 May 2018 20:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527132204; cv=none; d=google.com; s=arc-20160816; b=x1o6qCgKwv0ZHfllSKmnJ7dzmmlxNP6o918lYyZasaHX+17zgroTHPTdvY6c7TD107 dhamYMbYSqJDbRqASHm4dliiGPicul/vHdAbyQF4YJWl4KSXdalE5OHDt+9mRUG/s2Xs hgw05Dp1nKjGmcagmvJex92qhVetzWfW7me4E4srpVG1OThKI1tlyI2+DSXljWC3zrkY WNQfUowYpehREo6kC/LmaOWKD355BspLYt3BUiWhnA2t2kOMUjybM29We1eyXaZ1SbLL JbgHM/gXW8cE9jMANOJarD1uHRB1JVBDRjv+QluTS5dEi00LO0fIcaMzPGw6HMGkgz+B 4/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=rZuK/c0OIaqC8KH6Tdkk02snkyhmkBOuNYdBWecwC7c=; b=xaFFt7GQrOfEmwa2qdZMaSOCswy+T+C7YX4rQseWS4l+ihOWLPZtGFT7hTQskn6inb D8QTd+/aQuY9Jjsc60QwzMMGznbYuOdEMT8RIcG/hsvg6sFyK6aC8b7a5AVSE/ukqU5k db5WhHsxeq5bWrwPQGv5KXcxKX6zJjlFG0ggjC3oRJ0iEVpbIkYm6okNTPaeuI2w79L+ pdcw0YOOv9oh3YFmp1++xb89jJd3KHX9s0nUEGjYgBoDrTD5laYiMm4hhCq7FKCMOeoJ e1hzZkCflqwEc9Q1MFPL/5n+UvHWSo2MQYQ0J44cguX+XyZgT8O8ktsRbdH+W716bcM3 f8uw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k24-v6si19251711pff.91.2018.05.23.20.22.33; Wed, 23 May 2018 20:23:24 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935514AbeEXCwc (ORCPT + 99 others); Wed, 23 May 2018 22:52:32 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:14150 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S935296AbeEXCwa (ORCPT ); Wed, 23 May 2018 22:52:30 -0400 X-UUID: 755ebc2ac05d4fd29b14fd7394ba41d4-20180524 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1321666946; Thu, 24 May 2018 10:52:24 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 24 May 2018 10:52:21 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 24 May 2018 10:52:21 +0800 Message-ID: <1527130342.4607.27.camel@mtkswgap22> Subject: Re: [v3 03/10] mfd: mtk-mmsys: Add mmsys driver From: Sean Wang To: Lee Jones CC: , , , , , , , , , , , , , , , , , , , , , Matthias Brugger Date: Thu, 24 May 2018 10:52:22 +0800 In-Reply-To: <20180430101826.GC5147@dell> References: <20180430101826.GC5147@dell> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-04-30 at 11:18 +0100, Lee Jones wrote: > On Fri, 27 Apr 2018, matthias.bgg@kernel.org wrote: > > > From: Matthias Brugger > > > > The MMSYS subsystem includes clocks and drm components. > > This patch adds a MFD device to probe both drivers from the same > > device tree compatible. > > > > Signed-off-by: Matthias Brugger > > --- > > drivers/mfd/Kconfig | 9 ++++++ > > drivers/mfd/Makefile | 2 ++ > > drivers/mfd/mtk-mmsys.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++ [ ... ] > > +}; > > This driver is pretty pointless. It doesn't actually do anything. > > I think you just want to use "simple-mfd" instead. > Hi, Matthias Why not embedded a platform_device_register_data call into existent MMSYS driver ? It looks elegant and makes sense that mmsys device is being as parent device for all its DRM components device and no need to create an additional node representing the same device with mmsys simply in order to probe its DRM components. I'm planing to send a bunch of HDMI, MIPI related to MMSYS nodes for MT7623 SoC when 4.18 rc1 comes out, so we should want to solve the dt-binding violation issue first. Though there are two same mmsys-compatible strings involving in dts though, it seems that hdmi still can work fine in my setup. Sean > > +static const struct of_device_id of_match_mmsys[] = { > > + { .compatible = "mediatek,mt2701-mmsys", > > + .data = (void *) MMSYS_MT2701, > > + }, > > + { /* sentinel */ }, > > +}; > > + > > +static struct platform_driver mmsys_drv = { > > + .probe = mmsys_probe, > > + .driver = { > > + .name = "mediatek-mmysys", > > + .of_match_table = of_match_ptr(of_match_mmsys), > > + }, > > +}; > > + > > +builtin_platform_driver(mmsys_drv); > > + > > +MODULE_DESCRIPTION("Mediatek MMSYS multi-function driver"); > > +MODULE_LICENSE("GPL"); >