From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbbBWWBd (ORCPT ); Mon, 23 Feb 2015 17:01:33 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:60770 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861AbbBWWBb (ORCPT ); Mon, 23 Feb 2015 17:01:31 -0500 From: Arnd Bergmann To: Mark Brown Cc: linux-arm-kernel@lists.infradead.org, Barry Song , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Philipp Zabel , Maxime Ripard , Marek Vasut , Wolfram Sang Subject: Re: [PATCH] spi: sirf: add reset controller dependency Date: Mon, 23 Feb 2015 23:01:18 +0100 Message-ID: <6170208.Z0Upu48JrX@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150221094458.GM6236@finisterre.sirena.org.uk> References: <4553005.HBquOfbqXe@wuerfel> <7767301.zaEX63gvjp@wuerfel> <20150221094458.GM6236@finisterre.sirena.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:5RuP3AwkSFHvuN97N+7NsqBa+5HepV5ooBObQhibSO8UUQ3ipsd l1Xk2GV0dmnQQ1Mc0Jrkbb4It4ntbys60vIWHPCfdgRU8OKf9jiaGPLIHxuD/eYJI1q1fYr mdtoUGJLBy7Qdv5EFTXIFcp68xHbYvZi7R3LA5grl8mu1SjAaB7BLtC5qIUukzTIgn1Fq4v FH0izigIfvSe/WTBj3svg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 21 February 2015 18:44:58 Mark Brown wrote: > On Thu, Feb 19, 2015 at 04:01:29PM +0100, Arnd Bergmann wrote: > > > So the stubs are provided for all functions except device_reset() and > > reset_control_get(), and drivers using the API need to either call the > > stubbed-out _optional() versions of these functions or have the explicit > > dependency. > > In that case a dependency seems wrong, I'd expect to see a select - it's > a bit obscure to have to grovel around to figure out what magic options > are needed to make things turn on and resets feel more like a utility > thing than a control bus (which tend to be the things we depend on). > Dunno, perhaps I'm wrong? Mixing 'select' and 'depends on' causes recursive dependencies, and there are already lots of drivers that do 'depends on RESET_CONTROLLER'. Most users of this symbol seem to follow the strategy of selecting RESET_CONTROLLER when a driver is there to provide the functionality, but depending on it when a driver uses it. We are however a bit inconsistent here and it would be nice to clean it up. In this particular patch, I'm just following what others do. We should probably 'select ARCH_HAS_RESET_CONTROLLER' unconditionally for ARM ARCH_MULTIPLATFORM, as it's a bit silly to select both ARCH_HAS_RESET_CONTROLLER and RESET_CONTROLLER from platform code. Arnd