Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6229779yba; Thu, 11 Apr 2019 15:05:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOIfXyUWMFXvDb/fbQdZYP3qCyMv1KP7wAh+ntmSiC014LG5q24Qg6MB3MnfYBG4rAG1vN X-Received: by 2002:a62:aa01:: with SMTP id e1mr52569856pff.43.1555020316726; Thu, 11 Apr 2019 15:05:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555020316; cv=none; d=google.com; s=arc-20160816; b=vWhJ5HUNhwjaqkghIkbJrHKzyBMXGtzN5FLrsE9lPrT1LrS5XlswTJ5dcCxOONVI8a ZO5GYFnz7Q+9dnyZYP9L1s6j6/EdHvbu0IJ9rTF1a8vLAIhJGUmJ9EObW/Yhk2fOcfgy XJHaNBHbbe6mvnlFUnfthpB1t57gQikybL2WiOPNqtZPM3pkU+AVuMckhLFBob0k6WU4 7al3I/CMvwTWhRC4ahDZsO/g8HbuvbfQqXgtAS7F3h2cvkZv09V+U0Gq5khMiacgfOs6 XI7fcaaizBr0+2LbHcfG9chFkmVprRuqkJGSVtx8KYvHX/7/1PQ1wu4N3xe514LIHNY/ iCLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2HUjvHNlW+6CWT3UhnaiGuTsWl18A4p6PFj1vSHAWMc=; b=AuMejpoyrewXhOS34cLRznbMQ2p+MbOZYd7ku+7AO55xAL4JPyucKDEKp7eh6bwoZj GUyFMxr9V1lzGJgmqyAxzVCBlc0h7ltdCWMa0LbVHlqf25x5MzPgl3SATTaIJyZ7Q1xg uF8i+KSzEv/nii+xMcK0m9yn+jwiyZar5Q6KWhtN/Yp4/a2hpzWXh94GKdcC5Qi7eriY xrQh+sUZQJ5yWIvyIIkmrDxrZNHdSEyE1/YKEBRqhgCpfXkiTMLMr9b2XP0DOQqSz3t/ R1kESPwIGELN7TxwXKzOdWR2Z5pmKd7fFl2VtlNTBPMKkqz0Ww8tT11VdvH/7z7ylZbz ceUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=wNoXV5xB; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e7si35246669pfc.152.2019.04.11.15.05.00; Thu, 11 Apr 2019 15:05:16 -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; dkim=pass header.i=@kernel.org header.s=default header.b=wNoXV5xB; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726732AbfDKWEU (ORCPT + 99 others); Thu, 11 Apr 2019 18:04:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:53666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfDKWET (ORCPT ); Thu, 11 Apr 2019 18:04:19 -0400 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 7A33C20818; Thu, 11 Apr 2019 22:04:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555020258; bh=Baud+mROE27sGxu+HnEvlJOosHX081fISOF2ddZpslM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=wNoXV5xByIyJGn+mzlR49Z+lvyOiP1rNQMcQV2DBVmjyonAzAw57mjYrX9/vF9MLn MH6lV38szOztU9vMwZ/hsDgTq6OABHoRWJeKatGI6sJirU/zQKBJ+rIf2BQndRLw9c 1EOE0F8fuCD0c/Iiorz1ua65HbmPuIVm7R+TyMb4= Received: by mail-wm1-f43.google.com with SMTP id c1so8635526wml.4; Thu, 11 Apr 2019 15:04:18 -0700 (PDT) X-Gm-Message-State: APjAAAX10zCHdmpFsRnUzWr5cwfNyb5L4Z7Po1qQfKxPkqJ1ljuAciVR PA2u1qYv0SgXSFOTmMAN2wVmq1svXkY/kaiSejg= X-Received: by 2002:a1c:a010:: with SMTP id j16mr8120608wme.40.1555020257068; Thu, 11 Apr 2019 15:04:17 -0700 (PDT) MIME-Version: 1.0 References: <1554975138-801-1-git-send-email-light.hsieh@mediatek.com> In-Reply-To: <1554975138-801-1-git-send-email-light.hsieh@mediatek.com> From: Sean Wang Date: Thu, 11 Apr 2019 15:04:05 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pinctrl: Add kernel config PINCTRL_MTK_V2 To: Light Hsieh Cc: Linus Walleij , linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, wsd_upstream@mediatek.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Light On Thu, Apr 11, 2019 at 2:32 AM Light Hsieh wrote: > > Since no single Mediatek chip use code for PINCTRL_MTK and code for > PINCTRL_MTK_MOORE/PINCTRL_MTK_PARIS simultaneously, it is better to use > different config to determine if related code will be built or not on > building non-generic kernel. > > Add kernel config PINCTRL_MTK_V2 selected by either PINCTRL_MTK_MOORE > or PINCTRL_MTK_PARIS. > Use PINCTRL_MTK and PINCTRL_MTK_V2 to control building of > drivers/pinctrl/medaitek/. > Remove selection of EINT_MTK from PINCTRL_MTK since code for EINT_MTK is > only related to PINCTRL_MTK_MOORE/PINCTRL_MTK_PARIS, i.e. PINCTL_MTK_V2. > PINCTRL_MTK also depends on EINT_MTK such as the symbol mtk_eint_do_init, it is a common library for the two kinds of the pinctrl core. > --- > drivers/pinctrl/Makefile | 3 ++- > drivers/pinctrl/mediatek/Kconfig | 15 ++++++++++++--- > 2 files changed, 14 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile > index 712184b..fcee0e0 100644 > --- a/drivers/pinctrl/Makefile > +++ b/drivers/pinctrl/Makefile > @@ -65,6 +65,7 @@ obj-$(CONFIG_PINCTRL_SUNXI) += sunxi/ > obj-y += ti/ > obj-$(CONFIG_PINCTRL_UNIPHIER) += uniphier/ > obj-$(CONFIG_ARCH_VT8500) += vt8500/ > -obj-y += mediatek/ > +obj-$(CONFIG_PINCTRL_MTK) += mediatek/ > +obj-$(CONFIG_PINCTRL_MTK_V2) += mediatek/ I would think it is good if deciding V1 or not should be done inside the vendor directory and the change also would cause COMPILE_TEST not be applied to > obj-$(CONFIG_PINCTRL_ZX) += zte/ > obj-y += cirrus/ > diff --git a/drivers/pinctrl/mediatek/Kconfig b/drivers/pinctrl/mediatek/Kconfig > index a005cbc..5e26462 100644 > --- a/drivers/pinctrl/mediatek/Kconfig > +++ b/drivers/pinctrl/mediatek/Kconfig > @@ -2,10 +2,15 @@ menu "MediaTek pinctrl drivers" > depends on ARCH_MEDIATEK || COMPILE_TEST > > config EINT_MTK > - bool "MediaTek External Interrupt Support" > - depends on PINCTRL_MTK || PINCTRL_MTK_MOORE || PINCTRL_MTK_PARIS || COMPILE_TEST > + bool "MediaTek External Interrupt driver that is based on PINCTRL_MTK_V2" > + depends on PINCTRL_MTK_MOORE || PINCTRL_MTK_PARIS || COMPILE_TEST > select GPIOLIB > select IRQ_DOMAIN > + help > + Say yes here to enable support for MediaTek External Interrupt > + (EINT) driver based on PINCTRL_MTK version 2. > + This driver is combined with MediaTek Pinctrl driver version 2 > + so PINCTRL_MTK_V2 shall be set first. > > config PINCTRL_MTK > bool > @@ -13,9 +18,11 @@ config PINCTRL_MTK > select PINMUX > select GENERIC_PINCONF > select GPIOLIB > - select EINT_MTK > select OF_GPIO > > +config PINCTRL_MTK_V2 > + bool "MediaTek Pinctrl Support V2" > + > config PINCTRL_MTK_MOORE > bool > depends on OF > @@ -24,6 +31,7 @@ config PINCTRL_MTK_MOORE > select GENERIC_PINMUX_FUNCTIONS > select GPIOLIB > select OF_GPIO > + select PINCTRL_MTK_V2 > > config PINCTRL_MTK_PARIS > bool > @@ -33,6 +41,7 @@ config PINCTRL_MTK_PARIS > select GPIOLIB > select EINT_MTK > select OF_GPIO > + select PINCTRL_MTK_V2 > > # For ARMv7 SoCs > config PINCTRL_MT2701 > -- > 1.8.1.1.dirty >