Page MenuHomeFreeBSD

gpio: remove redundant calls to bus_attach_children
ClosedPublic

Authored by vexeduxr on Jul 1 2025, 2:36 PM.
Tags
None
Referenced Files
F161509480: D51108.id.diff
Sat, Jul 4, 10:13 AM
Unknown Object (File)
Sun, Jun 21, 4:11 AM
Unknown Object (File)
Fri, Jun 12, 3:11 PM
Unknown Object (File)
May 16 2026, 4:44 AM
Unknown Object (File)
May 15 2026, 8:25 PM
Unknown Object (File)
May 14 2026, 11:26 PM
Unknown Object (File)
May 14 2026, 1:45 PM
Unknown Object (File)
May 14 2026, 10:15 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Strictly speaking, they are not entirely useless. A multi-function device can expose multiple different buses, so it can add another child when gpiobus_attach_bus() is called. In an ideal world, we should have an explicit bus_attach_children() function at the end of each respective driver (especially if it exposes multiple functions).
However, this is only a theoretical notice , nothing more.

This revision is now accepted and ready to land.Jul 2 2025, 11:20 AM

Revert the max77620 and as3722 changes. They are handled differently.

This revision now requires review to proceed.Jul 2 2025, 3:53 PM

We could create a version gpiobus_attach_bus that doesn't call bus_attach_children for use by multi-function devices. That would mean all buses are added together for more control.

This revision is now accepted and ready to land.Jul 2 2025, 4:45 PM

This looks good. No need to hold things up for Andy's suggestion, but I think I like it for future consideration.