Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752354AbdHUIiS (ORCPT ); Mon, 21 Aug 2017 04:38:18 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:58243 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751865AbdHUIiR (ORCPT ); Mon, 21 Aug 2017 04:38:17 -0400 Message-ID: <1503304689.8125.6.camel@pengutronix.de> Subject: Re: [PATCH v3 3/5] reset: stm32: use the reset-simple driver From: Philipp Zabel To: Andre Przywara , Alexandru Gagniuc , Andreas =?ISO-8859-1?Q?F=E4rber?= Cc: linux-kernel@vger.kernel.org, Maxime Coquelin , Alexandre Torgue , Maxime Ripard , Chen-Yu Tsai , Baoyou Xie , Eugeniy Paltsev , Steffen Trumtrar , Dinh Nguyen , linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Date: Mon, 21 Aug 2017 10:38:09 +0200 In-Reply-To: <74144e84-cd37-511a-9702-ceb590f37bf0@arm.com> References: <20170816094701.30678-1-p.zabel@pengutronix.de> <20170816094701.30678-4-p.zabel@pengutronix.de> <338608e8-9e83-fc0f-8d8a-18a336e94860@suse.de> <74144e84-cd37-511a-9702-ceb590f37bf0@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2762 Lines: 71 On Thu, 2017-08-17 at 10:19 +0100, Andre Przywara wrote: > Hi, > > On 16/08/17 21:55, Alexandru Gagniuc wrote: > > > > > > On 08/16/2017 01:52 PM, Andreas Färber wrote: > > > Am 16.08.2017 um 22:50 schrieb Alexandru Gagniuc: > > > > On 08/16/2017 02:46 AM, Philipp Zabel wrote: > > > > > The reset-simple driver can be used without changes. > > > > > > > > > > Signed-off-by: Philipp Zabel > > > > > > > > > > > > Reviewed-by: Alexandru Gagniuc > > > > > > > > > --- > > > > >  drivers/reset/Kconfig        |  11 ++--- > > > > >  drivers/reset/Makefile       |   1 - > > > > >  drivers/reset/reset-simple.c |   1 + > > > > >  drivers/reset/reset-stm32.c  | 108 > > > > > ------------------------------------------- > > > > >  4 files changed, 4 insertions(+), 117 deletions(-) > > > > >  delete mode 100644 drivers/reset/reset-stm32.c > > > > > > > > > > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig > > > > > index 78a8f6057985b..29f4487c290fc 100644 > > > > > --- a/drivers/reset/Kconfig > > > > > +++ b/drivers/reset/Kconfig > > > > > @@ -70,19 +70,14 @@ config RESET_PISTACHIO > > > > > > > > > >  config RESET_SIMPLE > > > > >      bool "Simple Reset Controller Driver" if COMPILE_TEST > > > > > -    default ARCH_SOCFPGA || ARCH_SUNXI > > > > > +    default ARCH_SOCFPGA || ARCH_STM32 || ARCH_SUNXI > > > > > > > > If this series gets respun, could you please look into removing the > > > > ARCH_ dependency here? > > > > > > Why? > > > > Because the driver has to keep track of all its users, which is a > > layering violation. > > "keep track of all its users": not necessarily, this is mostly for > convenience reasons to get automatic coverage for those SoCs without > changing various defconfigs - or distribution .configs, for that matter. > Especially the latter may prove to be nasty and introduce regressions. > > But I see that this list may grow big and this is a bit beyond the scope > of the otherwise neat "default ARCH_xxx" trick. > > So given the generic nature of this driver, can't we make this simply: > "default ARM || ARM64" > That would enable it everywhere automatically, but people can still > disable this if they know what they do. > > Alternatively for ARM64 this is actually a candidate for the (one and > only) defconfig. I would like to make this driver selectable. but for that to happen, ARCH_HAS_RESET_CONTROLLER and RESET_CONTROLLER have to be merged into a single selectable symbol first. Until then, I'd be fine with making this driver: bool "Simple Reset Controller Driver" default ARM || ARM64 but in my opinion it is equally ok to have the default ARCH_* list for a while. regards Philipp