PCI: endpoint: Add pci_epf_ops to expose function-specific attrs
authorKishon Vijay Abraham I <kishon@ti.com>
Mon, 1 Feb 2021 19:58:01 +0000 (01:28 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Feb 2021 20:11:31 +0000 (14:11 -0600)
commit256ae475201b16fd69e00dd6c2d14035e4ea5745
tree80a3be4e40b155a0100d00cd5f84fc9b361519eb
parent87d5972e476f6c4e98a0abce713c54c6f40661b0
PCI: endpoint: Add pci_epf_ops to expose function-specific attrs

In addition to the attributes that are generic across function drivers
documented in Documentation/PCI/endpoint/pci-endpoint-cfs.rst, there could
be function-specific attributes that has to be exposed by the function
driver to be configured by the user. Add ->add_cfs() in pci_epf_ops to be
populated by the function driver if it has to expose any function-specific
attributes and pci_epf_type_add_cfs() to be invoked by pci-ep-cfs.c when
sub-directory to main function directory is created.

Link: https://lore.kernel.org/r/20210201195809.7342-10-kishon@ti.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/endpoint/pci-epf-core.c
include/linux/pci-epf.h