From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751742AbbBSPBx (ORCPT ); Thu, 19 Feb 2015 10:01:53 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:57394 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbbBSPBw (ORCPT ); Thu, 19 Feb 2015 10:01:52 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Mark Brown , 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: Thu, 19 Feb 2015 16:01:29 +0100 Message-ID: <7767301.zaEX63gvjp@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150219094155.GA3198@finisterre.sirena.org.uk> References: <4553005.HBquOfbqXe@wuerfel> <20150219094155.GA3198@finisterre.sirena.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:SjPEP+4EQFLUOwYlWE19GDUzpInShL91LAu5lQ3GPpyQwhMGUyn dbs3/kRrpu9GxCrgYqU21v88wWCEAyJmTYwho4qop9Q4M7aUU0ypQFqUBDEpdnauDLGAAgu EyFWmLH2Gu8rdOoUyTCsizQZSsrHvE12LWqEdK0uIbal4rvZ+HK1aj+gliVrqBeiG2tyNph sxImNPCFbC9el1rqhw9pQ== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 19 February 2015 18:41:55 Mark Brown wrote: > On Wed, Feb 18, 2015 at 04:29:10PM +0100, Arnd Bergmann wrote: > > > The adds a dependency in Kconfig to prevent it from being selected > > if the resets are not available. > > Why is this a better fix than making the reset controller API stub > itself out? It's probably not such a big deal here but for devices that > could be integrated into SoCs with and without reset controllers it > seems like we might want that. I would prefer that too, but it's not what the reset maintainer decided to have, citing b424080a9e0 ("reset: Add optional resets and stubs"): This patch adds device_reset_optional and (devm_)reset_control_get_optional variants that drivers can use to indicate they can function without control over the reset line. For those functions, stubs are added so the drivers can be compiled with CONFIG_RESET_CONTROLLER disabled. Also, device_reset is annotated with __must_check. Drivers ignoring the return value should use device_reset_optional instead. Signed-off-by: Philipp Zabel Reviewed-by: Maxime Ripard Reviewed-by: Marek Vasut Acked-by: Wolfram Sang 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. Arnd