From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965155AbbJIJ1S (ORCPT ); Fri, 9 Oct 2015 05:27:18 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:43376 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965020AbbJIJ1L (ORCPT ); Fri, 9 Oct 2015 05:27:11 -0400 Date: Fri, 9 Oct 2015 17:22:38 +0800 From: Jisheng Zhang To: Antoine Tenart CC: , , , , , , , , , , , , Subject: Re: [PATCH v4 2/6] pinctrl: berlin: add the berlin4ct pinctrl driver Message-ID: <20151009172238.68fdd51c@xhacker> In-Reply-To: <20151009090353.GA2842@kwain> References: <1444378629-3057-1-git-send-email-jszhang@marvell.com> <1444378629-3057-3-git-send-email-jszhang@marvell.com> <20151009090353.GA2842@kwain> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-10-09_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=inbound_notspam policy=inbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1507310000 definitions=main-1510090120 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Antoine, On Fri, 9 Oct 2015 11:03:53 +0200 Antoine Tenart wrote: > Hi Jisheng, > > On Fri, Oct 09, 2015 at 04:17:05PM +0800, Jisheng Zhang wrote: > > diff --git a/drivers/pinctrl/berlin/Kconfig b/drivers/pinctrl/berlin/Kconfig > > index b18322b..c13f6d2 100644 > > --- a/drivers/pinctrl/berlin/Kconfig > > +++ b/drivers/pinctrl/berlin/Kconfig > > @@ -17,4 +17,9 @@ config PINCTRL_BERLIN_BG2Q > > bool > > select PINCTRL_BERLIN > > > > +config PINCTRL_BERLIN_BG4CT > > + depends on OF && (ARCH_BERLIN || COMPILE_TEST) > > + bool "Marvell berlin4ct pin controller driver" > > + select PINCTRL_BERLIN > > + > > endif > > This endif ends the following condition: > > if ARCH_BERLIN > [...] > > So the "depends on ARCH_BERLIN" here can be dropped. Also the > COMPILE_TEST can be moved as it isn't BG4CT specific and all other > Berlin pinctrl drivers would benefit from this. > > So we would have something like: > > if (ARCH_BERLIN || COMPILE_TEST) Oh yeah! This is better. > [...] > endif > > Finally you can move the OF dependency to the PINCTRL_BERLIN config as > all Berlin pinctrl drivers depends on it. PINCTRL_BERLIN isn't user visible and it's selected by PINCTRL_BERLIN_BG4CT. So we may have the following random config case: CONFIG_OF=n CONFIG_PINCTRL_BERLIN_BG4CT=y In this case, there will be build errors for we missed OF. So we have to make PINCTRL_BERLIN_BG4CT depends on OF. What do you think? Or is there better solution? Thanks for kind review, Jisheng > > Thanks! > > Antoine >