All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-mips@linux-mips.org, kernel@stlinux.com,
	David Airlie <airlied@linux.ie>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Will Deacon <will.deacon@arm.com>,
	dri-devel@lists.freedesktop.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Alexandre Courbot <gnurou@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Michael Turquette <mturquette@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	Chen-Yu Tsai <wens@csie.org>,
	Maxime Coquelin <maxime.coquelin@st.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Stephe
Subject: Re: [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option
Date: Fri, 06 Nov 2015 10:29:54 +0100	[thread overview]
Message-ID: <4121507.a7FHqRxKcX@wuerfel> (raw)
In-Reply-To: <CAK7LNARjtTXUNQFDtcqtxUo0c49h_kfNCf-2WZUEFXmttZoFyA@mail.gmail.com>

On Friday 06 November 2015 14:58:04 Masahiro Yamada wrote:
> 2015-11-05 23:49 GMT+09:00 Arnd Bergmann <arnd@arndb.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

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: "Masahiro Yamada" <yamada.masahiro@socionext.com>,
	linux-mips@linux-mips.org, kernel@stlinux.com,
	"David Airlie" <airlied@linux.ie>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Will Deacon" <will.deacon@arm.com>,
	dri-devel@lists.freedesktop.org,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Benjamin Gaignard" <benjamin.gaignard@linaro.org>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Alexandre Courbot" <gnurou@gmail.com>,
	"Russell King" <linux@arm.linux.org.uk>,
	"Michael Turquette" <mturquette@linaro.org>,
	"Daniel Lezcano" <daniel.lezcano@linaro.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>,
	"Chen-Yu Tsai" <wens@csie.org>,
	"Maxime Coquelin" <maxime.coquelin@st.com>,
	"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Stephen Warren" <swarren@wwwdotorg.org>,
	"Haojian Zhuang" <haojian.zhuang@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jens Kuske" <jenskuske@gmail.com>,
	linux-tegra@vger.kernel.org,
	"Terje Bergström" <tbergstrom@nvidia.com>,
	"Vincent Abriou" <vincent.abriou@st.com>,
	"Mark Yao" <mark.yao@rock-chips.com>,
	"Barry Song" <baohua@kernel.org>,
	"Vishnu Patekar" <vishnupatekar0510@gmail.com>,
	"Eric Miao" <eric.y.miao@gmail.com>,
	linux-gpio@vger.kernel.org,
	"Srinivas Kandagatla" <srinivas.kandagatla@gmail.com>,
	"Patrice Chotard" <patrice.chotard@st.com>,
	"Ralf Baechle" <ralf@linux-mips.org>,
	linux-spi@vger.kernel.org,
	"Tuomas Tynkkynen" <ttynkkynen@nvidia.com>,
	"Sascha Hauer" <kernel@pengutronix.de>,
	"Maxime Ripard" <maxime.ripard@free-electrons.com>,
	"Shawn Guo" <shawnguo@kernel.org>
Subject: Re: [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option
Date: Fri, 06 Nov 2015 10:29:54 +0100	[thread overview]
Message-ID: <4121507.a7FHqRxKcX@wuerfel> (raw)
In-Reply-To: <CAK7LNARjtTXUNQFDtcqtxUo0c49h_kfNCf-2WZUEFXmttZoFyA@mail.gmail.com>

On Friday 06 November 2015 14:58:04 Masahiro Yamada wrote:
> 2015-11-05 23:49 GMT+09:00 Arnd Bergmann <arnd@arndb.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

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option
Date: Fri, 06 Nov 2015 10:29:54 +0100	[thread overview]
Message-ID: <4121507.a7FHqRxKcX@wuerfel> (raw)
In-Reply-To: <CAK7LNARjtTXUNQFDtcqtxUo0c49h_kfNCf-2WZUEFXmttZoFyA@mail.gmail.com>

On Friday 06 November 2015 14:58:04 Masahiro Yamada wrote:
> 2015-11-05 23:49 GMT+09:00 Arnd Bergmann <arnd@arndb.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

  reply	other threads:[~2015-11-06  9:29 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 11:15 [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option Masahiro Yamada
2015-11-05 11:15 ` Masahiro Yamada
2015-11-05 11:15 ` Masahiro Yamada
2015-11-05 11:15 ` Masahiro Yamada
     [not found] ` <1446722128-11961-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2015-11-05 11:15   ` [RFC PATCH 1/7] reset: drop ARCH_HAS_RESET_CONTROLLER Masahiro Yamada
2015-11-05 11:15     ` Masahiro Yamada
2015-11-05 11:15     ` Masahiro Yamada
2015-11-05 14:49   ` [RFC PATCH 0/7] reset: make RESET_CONTROLLER a select'ed option Arnd Bergmann
2015-11-05 14:49     ` Arnd Bergmann
2015-11-05 14:49     ` Arnd Bergmann
2015-11-05 14:49     ` Arnd Bergmann
2015-11-06  5:58     ` Masahiro Yamada
2015-11-06  5:58       ` Masahiro Yamada
2015-11-06  5:58       ` Masahiro Yamada
2015-11-06  9:29       ` Arnd Bergmann [this message]
2015-11-06  9:29         ` Arnd Bergmann
2015-11-06  9:29         ` Arnd Bergmann
2015-11-05 11:15 ` [RFC PATCH 2/7] spi: sunxi: remove redundant "depends on RESET_CONTROLLER" Masahiro Yamada
2015-11-05 11:28   ` Mark Brown
2015-11-05 11:28     ` Mark Brown
2015-11-05 12:11     ` Masahiro Yamada
2015-11-05 12:11       ` Masahiro Yamada
2015-11-05 12:20       ` Mark Brown
2015-11-05 12:20         ` Mark Brown
2015-11-05 12:32         ` Masahiro Yamada
2015-11-05 12:32           ` Masahiro Yamada
2015-11-05 15:05           ` Mark Brown
2015-11-05 15:05             ` Mark Brown
2015-11-06  6:00             ` Masahiro Yamada
2015-11-06  6:00               ` Masahiro Yamada
2015-11-06 10:21               ` Mark Brown
2015-11-06 10:21                 ` Mark Brown
2015-11-05 11:15 ` [RFC PATCH 3/7] spi: tegra: " Masahiro Yamada
2015-11-05 11:50   ` Mark Brown
2015-11-06  6:02     ` Masahiro Yamada
2015-11-06  6:02       ` Masahiro Yamada
2015-11-06 10:22       ` Mark Brown
2015-11-05 11:15 ` [RFC PATCH 4/7] pinctrl: sunxi: " Masahiro Yamada
2015-11-05 11:15   ` Masahiro Yamada
2015-11-05 11:15   ` Masahiro Yamada
2015-11-05 13:40   ` Linus Walleij
2015-11-05 13:40     ` Linus Walleij
2015-11-05 13:40     ` Linus Walleij
2015-11-05 14:06     ` Linus Walleij
2015-11-05 14:06       ` Linus Walleij
2015-11-05 14:06       ` Linus Walleij
2015-11-16  3:40     ` Masahiro Yamada
2015-11-16  3:40       ` Masahiro Yamada
2015-11-16  3:40       ` Masahiro Yamada
2015-11-17 14:03       ` Linus Walleij
2015-11-17 14:03         ` Linus Walleij
2015-11-17 14:03         ` Linus Walleij
2015-11-05 11:15 ` [RFC PATCH 5/7] drm/sti: replace "select RESET_CONTROLLER" with "depends on ..." Masahiro Yamada
2015-11-05 11:15 ` [RFC PATCH 6/7] drm/rockchip: remove redundant "depends on RESET_CONTROLLER" Masahiro Yamada
2015-11-05 11:15   ` Masahiro Yamada
2015-11-05 11:15 ` [RFC PATCH 7/7] drm/tegra: tegra: " Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4121507.a7FHqRxKcX@wuerfel \
    --to=arnd@arndb.de \
    --cc=airlied@linux.ie \
    --cc=benjamin.gaignard@linaro.org \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gnurou@gmail.com \
    --cc=heiko@sntech.de \
    --cc=kernel@stlinux.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=maxime.coquelin@st.com \
    --cc=mturquette@linaro.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thierry.reding@gmail.com \
    --cc=wens@csie.org \
    --cc=will.deacon@arm.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.