[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250113-b4-imx-gpio-base-warning-v1-0-0a28731a5cf6@pengutronix.de>
Date: Mon, 13 Jan 2025 23:19:08 +0100
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Andy Whitcroft <apw@...onical.com>,
Joe Perches <joe@...ches.com>, Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>, Fabio Estevam <festevam@...il.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>
Cc: Dario Binacchi <dario.binacchi@...rulasolutions.com>,
Haibo Chen <haibo.chen@....com>,
Catalin Popescu <catalin.popescu@...ca-geosystems.com>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
Ahmad Fatoum <a.fatoum@...gutronix.de>
Subject: [PATCH 0/4] gpio: mxc: silence warning about GPIO base being
statically allocated
The i.MX GPIO driver has had deterministic numbering for the GPIOs
for more than 12 years.
Reverting this to dynamically numbered will break existing setups in the
worst manner possible: The build will succeed, the kernel will not print
warnings, but users will find their devices essentially toggling GPIOs
at random with the potential of permanent damage. We thus want to keep
the numbering as-is until the SysFS API is removed and script fail
instead of toggling GPIOs dependent on probe order.
Yet, the warning:
gpio gpiochip0: Static allocation of GPIO base is deprecated,
use dynamic allocation.
is annoying and prompts people to set the base to -1 from time to time.
Let's workaround this by adding an opt-out for existing drivers and have
i.MX make use of it.
---
Ahmad Fatoum (4):
gpiolib: add opt-out for existing drivers with static GPIO base
checkpatch: warn about use of legacy_static_base
gpio: mxc: remove dead code after switch to DT-only
gpio: mxc: silence warning about GPIO base being statically allocated
drivers/gpio/gpio-mxc.c | 23 +++++++++++++++++++++--
drivers/gpio/gpiolib.c | 2 +-
include/linux/gpio/driver.h | 5 +++++
scripts/checkpatch.pl | 11 +++++++++--
4 files changed, 36 insertions(+), 5 deletions(-)
---
base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc
change-id: 20250113-b4-imx-gpio-base-warning-4f9ae89887d0
Best regards,
--
Ahmad Fatoum <a.fatoum@...gutronix.de>
Powered by blists - more mailing lists