linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: imx@lists.linux.dev, linux-gpio@vger.kernel.org,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	linux-kernel@vger.kernel.org, Shawn Guo <shawnguo@kernel.org>,
	Joe Perches <joe@perches.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Haibo Chen <haibo.chen@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Andy Whitcroft <apw@canonical.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	Catalin Popescu <catalin.popescu@leica-geosystems.com>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	Fabio Estevam <festevam@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] gpiolib: add opt-out for existing drivers with static GPIO base
Date: Tue, 21 Jan 2025 12:34:04 +0100	[thread overview]
Message-ID: <f1b00285-4afb-4a3b-9918-46fbfc8ce4a8@pengutronix.de> (raw)
In-Reply-To: <CACRpkdbgv5BhP_iv1fV7-=w6qF3H+=GiUJz=hQko3rcd6uq4BQ@mail.gmail.com>

Hi Linus,

On 15.01.25 13:00, Linus Walleij wrote:
> On Mon, Jan 13, 2025 at 11:19 PM Ahmad Fatoum <a.fatoum@pengutronix.de> wrote:
> 
>> As these concerns won't go away until the sysfs interface is removed,
>> let's add a new struct gpio_chip::legacy_static_base member that can be
>> used by existing drivers that have been grandfathered in to suppress
>> the warning currently being printed:
> 
> I think entire drivers, pertaining to in worst case several generations
> of SoCs is not the way to approach this. It could be a SoC or, more
> likely, single systems using a SoC, that has a problem with this.
> 
> If you want to safeguard this I would use some code loop in the
> gpiolib(-sysfs) that looks at of_machine_is_compatible("foo,bar-machine")
> to match the top-level compatible for known problematic machines
> so we can be fine-grained of this so when that machines retires
> the driver can start using dynamic GPIO number allotment.

It's meant to apply to all existing i.MX SoCs, but not for new ones using
the same driver.

Filtering by board is not practical and doesn't address the problem of
a kernel update leading to toggling of arbitrary GPIOs.

I am wondering, what remaining _users_ of the GPIO base do we have.
Is it just SysFS and legacy board code?

Cheers,
Ahmad

> 
> Yours,
> Linus Walleij
> 
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2025-01-21 11:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-13 22:19 [PATCH 0/4] gpio: mxc: silence warning about GPIO base being statically allocated Ahmad Fatoum
2025-01-13 22:19 ` [PATCH 1/4] gpiolib: add opt-out for existing drivers with static GPIO base Ahmad Fatoum
2025-01-14  9:49   ` Andy Shevchenko
2025-01-14 10:06     ` Ahmad Fatoum
2025-01-14 19:38       ` Andy Shevchenko
2025-01-15  7:07         ` Ahmad Fatoum
2025-01-15 13:04           ` Kent Gibson
2025-01-21 10:26             ` Ahmad Fatoum
2025-01-15 12:00   ` Linus Walleij
2025-01-21 11:34     ` Ahmad Fatoum [this message]
2025-01-13 22:19 ` [PATCH 2/4] checkpatch: warn about use of legacy_static_base Ahmad Fatoum
2025-01-14 14:37   ` Linus Walleij
2025-01-13 22:19 ` [PATCH 3/4] gpio: mxc: remove dead code after switch to DT-only Ahmad Fatoum
2025-01-14  9:51   ` Andy Shevchenko
2025-01-15 16:55   ` Bartosz Golaszewski
2025-01-21 10:16     ` Ahmad Fatoum
2025-01-13 22:19 ` [PATCH 4/4] gpio: mxc: silence warning about GPIO base being statically allocated Ahmad Fatoum
2025-01-14  9:46 ` [PATCH 0/4] " Andy Shevchenko
2025-01-14  9:55   ` Ahmad Fatoum
2025-01-14 19:43     ` Andy Shevchenko
2025-01-15  7:03       ` Ahmad Fatoum
2025-01-15 15:16         ` Andy Shevchenko
2025-01-21 11:16           ` Ahmad Fatoum
2025-01-15 16:52     ` Bartosz Golaszewski
2025-01-21 10:37       ` Ahmad Fatoum
2025-01-23  9:19         ` Bartosz Golaszewski
2025-01-23  8:06 ` (subset) " Bartosz Golaszewski

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=f1b00285-4afb-4a3b-9918-46fbfc8ce4a8@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=apw@canonical.com \
    --cc=brgl@bgdev.pl \
    --cc=catalin.popescu@leica-geosystems.com \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=festevam@gmail.com \
    --cc=haibo.chen@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=joe@perches.com \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --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).