[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a1HGJpYnmhGb_eZzrv0ZopOJ-JuC6hyNP8V87C1Po9ruw@mail.gmail.com>
Date: Fri, 28 May 2021 09:53:37 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Esben Haabendal <esben@...nix.com>
Cc: Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Russell King <linux@...linux.org.uk>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] ARM: imx: only enable pinctrl as needed
On Tue, May 25, 2021 at 1:22 PM Esben Haabendal <esben@...nix.com> wrote:
>
> As not all mach-imx platforms has support for run-time changes of pin
> configurations (such as LS1021A), a more selective approach to enabling
> pinctrl infrastructure makes sense, so that an e.g. an LS1021A only kernel
> could be built without pinctrl support.
>
> Signed-off-by: Esben Haabendal <esben@...nix.com>
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.
The second version allows turning off PINCTRL completely though, as
we do for other top-level subsystems that would likely make the system
unusable when disabled (block, serial, ...), and it allows compile-testing
on other machines, provided some dependencies (CONFIG_OF in the
example) are met. It could theoretically also allow making it a 'tristate'
option, as we do for an increasing number of drivers.
Arnd
Powered by blists - more mailing lists