From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033093AbbKFJbl (ORCPT ); Fri, 6 Nov 2015 04:31:41 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:61407 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032020AbbKFJbf (ORCPT ); Fri, 6 Nov 2015 04:31:35 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Masahiro Yamada , linux-mips@linux-mips.org, kernel@stlinux.com, David Airlie , Catalin Marinas , Linus Walleij , Will Deacon , dri-devel@lists.freedesktop.org, Linux Kernel Mailing List , Thierry Reding , Benjamin Gaignard , Heiko Stuebner , Alexandre Courbot , Russell King , Michael Turquette , Daniel Lezcano , "open list:ARM/Rockchip SoC..." , Chen-Yu Tsai , Maxime Coquelin , Sebastian Hesselbarth , Philipp Zabel , Stephen Warren , Haojian Zhuang , Hans de Goede , Mark Brown , Jens Kuske , linux-tegra@vger.kernel.org, Terje =?ISO-8859-1?Q?Bergstr=F6m?= , Vincent Abriou , Mark Yao , Barry Song , Vishnu Patekar , Eric Miao , linux-gpio@vger.kernel.org, Srinivas Kandagatla , Patrice Chotard , Ralf Baechle , linux-spi@vger.kernel.org, Tuomas Tynkkynen , Sascha Hauer , Maxime Ripard , Shawn Guo Subject: Re: [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option Date: Fri, 06 Nov 2015 10:29:54 +0100 Message-ID: <4121507.a7FHqRxKcX@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1446722128-11961-1-git-send-email-yamada.masahiro@socionext.com> <3770393.BLNOaUSB5Q@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:EeCZCvxjW4tm5AvhtPWOUy9iCTtUJFsqzIvzBCYxI+7HlJcalL5 d6plB8nC+AGhEwI+Q1OMDTj+WguhnXAGlTUtYKjfuAxMSMU4ciOL6TMaHjgSR4Wo+H3vi5v rgN1KJ7iwqekdmPzS4cCQ9EhVcjopHPJw9wk7jKbpxe4dQ2+jh18ArNY7oRMooiwVpIPrUQ AdAjQu452BRSyrAZKVWtg== X-UI-Out-Filterresults: notjunk:1;V01:K0:f2RmRuHy1Yw=:A3Rco0XPGUQPexb67LaZ7F X1X/r+AUb+u8HXqlfzAHBhg331/MHRe6A+PKTsWkjAfZmwHpgpj3Nrv2+IYUEEFIGTlKrYC+n BJgvqlfp8xe0e0QY1XZFU5e/qg81IuJeIQ9nvupfLY8K5uNwBrjZmPIAGMxejUUZf1PMYVcXB s9SUrlQNSrjaxh4UykbVprmIPTOPPjWVd5lOIWglgy2ew/qbksXpzsXadJ/n89z4EySSB/OrV 0qr/V5niyM1duTsS0azwUtrQ5oENFn7/kbLb6t7PtkVGzRRgicNVycVLAi+VTE09HqiZddxEf fGSsJ2KrqtOrA9tqybl/sUyAtvGTR/2TvT2J5kOHKTI34pImQOPO8dfgBrgx4YgNw+S1MIyRf /Od+7aINl0JL+Di62gb1kq9cM/v21SJQSfWZFb21/7eJbQpA/CuxA6PK8HlQluKtLFfxQbe0X oYoolC1xxav+1rEArlg0ZQNSLZO2srSldLpw9k0tpQIH1cNjAZbZN+wM/Nu4EbSrU6e1tV6eT I5oSV99hyVtuNb+LLQypW10pbTP39ngJ5MK5BzQR16LBlYQVabasADDGKhejpAxYQA9B0NWSw M323Ol+T/5gtfpq6WMWEqpjjzNH9P/91/C887cKg/plhFUSdUoukri0KsXtMnfZfz/dsjfSKS VSayKcuKOa9BMb9fPGNuyomcB4V6veljDOlmHOZcPhNmaKGAPNl2PWbROMj3zcqiV2pXX+jal GelUr2DEIRrzWu6y Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 06 November 2015 14:58:04 Masahiro Yamada wrote: > 2015-11-05 23:49 GMT+09:00 Arnd Bergmann : > [1] > Why is ARCH_HAS_RESET_CONTROLLER select'ed by > ARCH_MULTIPLATFORM, but not by others? > This seems weird. I tried to avoid having to set this from each platform separately, and all users of ARCH_HAS_RESET_CONTROLLER on ARM are also based on ARCH_MULTIPLATFORM. The other platforms are lagging behind in their conversion and use neither reset controllers not multiplatform. If anyone wants to make them use reset controllers, we probably want them to use multiplatform as well. > We do not have such options like > ARCH_HAS_PINCTRL, ARCH_HAS_COMMON_CLK... We could of course change it in one direction or another, but it didn't seem urgent here. > [2] > The difference is that yours is adding per-driver options such as > RESET_SOCFPGA, RESET_BERLIN, etc. > I think this is a good idea. > > But, I notice lowlevel drivers select RESET_CONTROLLER, > for example, RESET_SOCFPGA select RESET_CONTROLLER. > > We generally do the opposite in other subsystems, I think. > > > For example, the whole of clk menu is guarded by "depends on COMMON_CLK". > > menu "Common Clock Framework" > depends on COMMON_CLK > > > > endmenu > > > Likewise for pinctrl. We can do that too, either way works for me, and we are using both in other parts of the kernel. REGMAP is an example for another subsystem that gets selected by each driver that relies on the framework. The practical difference is only in the case that the subsystem is enabled (e.g. by using ARCH_MULTIPLATFORM) but all reset drivers are disabled. A device driver using the API in one case will see the stubbed-out inline helpers and not contain any object code that relies on non-NULL return values from them, while in the other case it calls into the subsystem code to get the same return value at runtime. If you volunteer to clean up my patch, feel free to choose between the two options as you like. Arnd