[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4121507.a7FHqRxKcX@wuerfel>
Date: Fri, 06 Nov 2015 10:29:54 +0100
From: Arnd Bergmann <arnd@...db.de>
To: linux-arm-kernel@...ts.infradead.org
Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>,
linux-mips@...ux-mips.org, kernel@...inux.com,
David Airlie <airlied@...ux.ie>,
Catalin Marinas <catalin.marinas@....com>,
Linus Walleij <linus.walleij@...aro.org>,
Will Deacon <will.deacon@....com>,
dri-devel@...ts.freedesktop.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Thierry Reding <thierry.reding@...il.com>,
Benjamin Gaignard <benjamin.gaignard@...aro.org>,
Heiko Stuebner <heiko@...ech.de>,
Alexandre Courbot <gnurou@...il.com>,
Russell King <linux@....linux.org.uk>,
Michael Turquette <mturquette@...aro.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
"open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
Chen-Yu Tsai <wens@...e.org>,
Maxime Coquelin <maxime.coquelin@...com>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Stephen Warren <swarren@...dotorg.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Hans de Goede <hdegoede@...hat.com>,
Mark Brown <broonie@...nel.org>,
Jens Kuske <jenskuske@...il.com>, linux-tegra@...r.kernel.org,
Terje Bergström <tbergstrom@...dia.com>,
Vincent Abriou <vincent.abriou@...com>,
Mark Yao <mark.yao@...k-chips.com>,
Barry Song <baohua@...nel.org>,
Vishnu Patekar <vishnupatekar0510@...il.com>,
Eric Miao <eric.y.miao@...il.com>, linux-gpio@...r.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@...il.com>,
Patrice Chotard <patrice.chotard@...com>,
Ralf Baechle <ralf@...ux-mips.org>, linux-spi@...r.kernel.org,
Tuomas Tynkkynen <ttynkkynen@...dia.com>,
Sascha Hauer <kernel@...gutronix.de>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Shawn Guo <shawnguo@...nel.org>
Subject: Re: [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option
On Friday 06 November 2015 14:58:04 Masahiro Yamada wrote:
> 2015-11-05 23:49 GMT+09:00 Arnd Bergmann <arnd@...db.de>:
> [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
>
> <bunch of low-level drivers>
>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists