linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Esben Haabendal <esben@geanix.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	Russell King <linux@armlinux.org.uk>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: imx: only enable pinctrl as needed
Date: Fri, 28 May 2021 10:56:31 +0200	[thread overview]
Message-ID: <CACRpkdZpJOMg2rNbJW_Oi-P5O+k6=rMB1XEUd1BwJQK14fMH2w@mail.gmail.com> (raw)
In-Reply-To: <CAK8P3a1HGJpYnmhGb_eZzrv0ZopOJ-JuC6hyNP8V87C1Po9ruw@mail.gmail.com>

On Fri, May 28, 2021 at 9:55 AM Arnd Bergmann <arnd@arndb.de> wrote:

> I think it would be even better to leave all these drivers to be
> user-configurable. The symbols are currently defined as e.g.
>
> config PINCTRL_IMX51
>         bool "IMX51 pinctrl driver"
>         depends on SOC_IMX51
>         select PINCTRL_IMX
>         help
>           Say Y here to enable the imx51 pinctrl driver
>
> which could be changed to
>
> config PINCTRL_IMX51
>         bool "IMX51 pinctrl driver" if COMPILE_TEST && !SOC_IMX51
>         depends on OF
>         default SOC_IMX51
>         select PINCTRL_IMX
>         help
>           Say Y here to enable the imx51 pinctrl driver
>
> Today, having it configurable is pointless because you can't turn it off
> when SOC_IMX51 is set, and you can't turn it on when SOC_IMX51
> is disabled.

I agree this looks better.

With pin control drivers I think this often reflects the desire
to not make it possible to build a kernel that will not boot.

Usually this is because initramfs is assumed not to be used to house
the most necessary modules, so any modules need to be loaded
later from e.g. eMMC and that of course needs pin control
before it can be mounted.

I think it is a bit of "embedded culture" to do things like
this, because the distro way with modules and initramfs isn't
used by all embedded build environments like it is on your
regular Debian, Fedora, ... etc. Instead they assume a
monolithic kernel tailored for the hardware to a certain extent.

Maybe we need to clarify somehow that the driving idea
behind multiplatform also assumes modularization and
using initramfs for the most necessary modules and things
like that.

Yours,
Linus Walleij

  reply	other threads:[~2021-05-28  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 11:22 [PATCH] ARM: imx: only enable pinctrl as needed Esben Haabendal
2021-05-28  7:53 ` Arnd Bergmann
2021-05-28  8:56   ` Linus Walleij [this message]
2021-06-01 11:24   ` Rasmus Villemoes

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='CACRpkdZpJOMg2rNbJW_Oi-P5O+k6=rMB1XEUd1BwJQK14fMH2w@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=arnd@arndb.de \
    --cc=esben@geanix.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rasmusvillemoes.dk \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).