Why set .suppress_bind_attrs even though .remove() implemented?

From: Bjorn Helgaas
Date: Thu Jul 21 2022 - 15:54:41 EST


The j721e, kirin, tegra, and mediatek drivers all implement .remove().

They also set ".suppress_bind_attrs = true". I think this means
bus_add_driver() will not create the "bind" and "unbind" sysfs
attributes for the driver that would allow users to users to manually
attach and detach devices from it.

Is there a reason for this, or should these drivers stop setting
.suppress_bind_attrs?

For example, Pali and Ley Foon *did* stop setting .suppress_bind_attrs
when adding .remove() methods in these commits:

0746ae1be121 ("PCI: mvebu: Add support for compiling driver as module")
526a76991b7b ("PCI: aardvark: Implement driver 'remove' function and allow to build it as module")
ec15c4d0d5d2 ("PCI: altera: Allow building as module")

Bjorn