linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yingjoe Chen <yingjoe.chen@mediatek.com>
To: Arnd Bergmann <arnd@arndb.de>, Linus Walleij <linus.walleij@linaro.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
	Hongzhou Yang <hongzhou.yang@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	srv_heupstream@mediatek.com, linux-mediatek@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>
Subject: Re: [PATCH 2/2] pinctrl: mediatek: Adjust mt8173 pinctrl kconfig
Date: Fri, 13 Mar 2015 14:46:35 +0800	[thread overview]
Message-ID: <1426229195.16768.278.camel@mtksdaap41> (raw)
In-Reply-To: <3011616.9oVy3HN0Pj@wuerfel>



Hi Arnd,

Thanks for your suggestion.

On Mon, 2015-03-09 at 21:36 +0100, Arnd Bergmann wrote:
> On Friday 06 March 2015 14:24:51 Yingjoe Chen wrote:
> > Linus,
> > This one make PINCTRL_MT8173 option user selectable and is based on
> > mtk-staging in your tree. If you think this is OK, please applied or
> > squash this into previous change. Thanks.
> 
> The patch looks good in principle, just two small comments
> 
> > --------------------------------------------------
> 
> To simplify the job for Linus here, please start the line above
> with 
> 
> 8<------
> 
> (a stylized pair if scissors)
> 
> which is the magic that git-am looks for.

Will do next time.


<...>
> You have slightly different logic here: PINCTRL_MT8135 will
> always be enabled when COMPILE_TEST is on, while PINCTRL_MT8173
> is enabled by default in this case, but can be turned off.
> Neither of them is what you really want, which would be
> 
> config PINCTRL_MT8135
> 	bool "Mediatek MT8135 pin control"
> 	depends on MACH_MT8135 || COMPILE_TEST
> 	default MACH_MT8135
> 	select PINCTRL_MTK_COMMON
> 
> config PINCTRL_MT8135
> 	bool "Mediatek MT8173 pin control"
> 	depends on MACH_MT8173 || COMPILE_TEST
> 	default MACH_MT8173
> 	select PINCTRL_MTK_COMMON
> 
> This way, the options are only enabled by default if MACH_MT8135
> or MACH_MT8173 are enabled, but you are free to enable or disable
> them when COMPILE_TEST is set. Alternatively, you can do
> 
> config PINCTRL_MT8135
> 	bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135
> 	default MACH_MT8135
> 	select PINCTRL_MTK_COMMON
> 
> config PINCTRL_MT8135
> 	bool "Mediatek MT8173 pin control" if COMPILE_TEST && !MACH_MT8173
> 	default MACH_MT8173
> 	select PINCTRL_MTK_COMMON
> 
> which will let you turn on the options if COMPILE_TEST is set, but not
> let you turn them off when the drivers are required.

Yes, this is preferred. Because we don't have MACH_MT8173, so it is
possible a ARM64 + ARCH_MEDIATEK system doesn't need PINCTRL_MT8173, so
we still need 2 slightly different logic. Is it OK if I do this?
Also add some comments so future SoCs can follow the correct template.

# For ARMv7 SoCs
config PINCTRL_MT8135
        bool "Mediatek MT8135 pin control" if COMPILE_TEST && !MACH_MT8135
        default MACH_MT8135
        select PINCTRL_MTK_COMMON

# For ARMv8 SoCs
config PINCTRL_MT8173
        bool "Mediatek MT8173 pin control"
        depends on ARM64 || COMPILE_TEST
        default ARM64
        select PINCTRL_MTK_COMMON

Joe.C

  reply	other threads:[~2015-03-13  6:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06  6:24 [PATCH 1/2] arm64: mediatek: Select PINCTRL for Mediatek platform Yingjoe Chen
2015-03-06  6:24 ` [PATCH 2/2] pinctrl: mediatek: Adjust mt8173 pinctrl kconfig Yingjoe Chen
2015-03-06 11:05   ` Paul Bolle
2015-03-09  8:26     ` Yingjoe Chen
2015-03-09  8:13   ` [PATCH] " Yingjoe Chen
2015-03-09 20:36   ` [PATCH 2/2] " Arnd Bergmann
2015-03-13  6:46     ` Yingjoe Chen [this message]
2015-03-13 10:08       ` Arnd Bergmann
2015-03-13 14:40   ` [PATCH v3] " Yingjoe Chen
2015-03-18 12:01     ` Linus Walleij
2015-03-06 13:18 ` [PATCH 1/2] arm64: mediatek: Select PINCTRL for Mediatek platform Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426229195.16768.278.camel@mtksdaap41 \
    --to=yingjoe.chen@mediatek.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=hongzhou.yang@mediatek.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=srv_heupstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).