Doing a quick interlude here, On Wed, Jan 28, 2026 at 4:48 PM Johan Hovold <[email protected]> wrote:
> What I've been trying to get across is that the chardev hot-unplug issue > is real and needs to be fixed where it still exists, while the manual > unbinding of drivers by root is a corner case which does not need to be > addressed at *any* cost. I agree with Johans stance here. I might have a skewed view of history and be a bit self-delusional, but at the time I began the work with the GPIO character device, what we were seeing were these GPIO adapters on USB. Those were/are hot-pluggable, and provide GPIOs that are not for "system critical" things, i.e. not critical for the computer/system it is running on. Instead these are things like the Mikroe Clickboard GPIO expander and TTY, or these GPIOs that come on FTDI USB adapters. These can and are certainly being used for things that are critical to the thing they are used for, such as regulating water reserves for your local hydro power plant. Of course only a madman would unplug that, but from Linux' POV they are very hot-pluggable, by their very nature. [Side quest on what are some insanities industrial system people do here... but these adapters are *very* popular.] Since they are hot-pluggable and will never appear in DTS files or such, a character device or other userspace ABI is the right abstraction, and it needs to be able to come and go without crashing or wasting memory. Plug/unplug the Mikroe clickboard GPIO 10.000 times should be fine under any circumstances. And that is the problem that need to be solved *first*, before removing things on (local) I2C buses or unbinding random devices from sysfs making them unpluggable in theory. Yours, Linus Walleij
