On Tue, Oct 7, 2025 at 12:09 AM Manivannan Sadhasivam <[email protected]> wrote: > > > > > > > Not always... For something like shared reset line, consumers request the > > > line > > > as GPIO and expect gpiolib to do resource manangement. > > > > > > > They could use the reset API and it would implicitly create a virtual > > device that requests the reset GPIO and controls its enable count. > > Except that some devices also do a specific reset sequence with delays > > etc. That would require some additional logic in reset-gpio. > > > > I was referring to the PCIe PERST# line, for which the 'reset-gpios' property > already exist in the schema. Now, you want me to model this simple GPIO as a > fake reset controller and use it the PCIe Bridge nodes through 'resets' > property? >
No, not at all. It's just that a shared `reset-gpios` property is pretty common and Krzysztof implemented the reset-gpio driver[1] to address it. Drivers that request a reset control via the OF interface will notice that there's no `resets` property but if there's a `reset-gpios`, the reset core will create a virtual device binding to the reset-gpio driver which requests the GPIO in question (once!) and registers with the reset subsystem providing shared reset control to users. Basically the abstraction Srini mentioned minus any reset sequence. That only happens if the driver uses the reset API. If you go with the GPIOLIB then none of this matters. I definitely don't want to change the existing DT sources either but I want to find out if the code in this series is suitable (with some modifications) for supporting the PERST# line or if the logic behind it is more complex and possibly requires separate, more fine-grained handling. Bartosz [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/reset/reset-gpio.c
