Skip to contentSkip to conversation

PCI: Update the devres documentation regarding to pcim_*()

PATCH RESEND Applied Andy Shevchenko 3 participants 3 messages Oct 6, 2023 – Oct 10, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 PCI: Update the devres documentation regarding to pcim_*()

There were many changes to PCI core in scope of managed resources APIs. Update documentation to list the current state of affairs.

---
 Documentation/driver-api/driver-model/devres.rst | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Documentation/driver-api/driver-model/devres.rst +10 -4
index 8be086b3f829..c5f99d834ec5 100644
@@ -322,10 +322,8 @@ IOMAP
   devm_platform_ioremap_resource_byname()
   devm_platform_get_and_ioremap_resource()
   devm_iounmap()
-  pcim_iomap()
-  pcim_iomap_regions()	: do request_region() and iomap() on multiple BARs
-  pcim_iomap_table()	: array of mapped addresses indexed by BAR
-  pcim_iounmap()
+
+  Note: For the PCI devices the specific pcim_*() functions may be used, see below.
 
 IRQ
   devm_free_irq()
@@ -392,8 +390,16 @@ PCI
   devm_pci_alloc_host_bridge()  : managed PCI host bridge allocation
   devm_pci_remap_cfgspace()	: ioremap PCI configuration space
   devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
+
   pcim_enable_device()		: after success, all PCI ops become managed
+  pcim_iomap()			: do iomap() on a single BAR
+  pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
+  pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
+  pcim_iomap_table()		: array of mapped addresses indexed by BAR
+  pcim_iounmap()		: do iounmap() on a single BAR
+  pcim_iounmap_regions()	: do iounmap() and release_region() on multiple BARs
   pcim_pin_device()		: keep PCI device enabled after release
+  pcim_set_mwi()		: enable Memory-Write-Invalidate PCI transaction
 
 PHY
   devm_usb_get_phy()
Signature · 1 line
2.40.0.1.gaa8946217a0b
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Andy Shevchenko

There were many changes to PCI core in scope of managed resources APIs. Update documentation to list the current state of affairs.

Looks good.

Quoted 41 lines
---
 Documentation/driver-api/driver-model/devres.rst | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Documentation/driver-api/driver-model/devres.rst +10 -4
index 8be086b3f829..c5f99d834ec5 100644
@@ -322,10 +322,8 @@ IOMAP
   devm_platform_ioremap_resource_byname()
   devm_platform_get_and_ioremap_resource()
   devm_iounmap()
-  pcim_iomap()
-  pcim_iomap_regions()	: do request_region() and iomap() on multiple BARs
-  pcim_iomap_table()	: array of mapped addresses indexed by BAR
-  pcim_iounmap()
+
+  Note: For the PCI devices the specific pcim_*() functions may be used, see below.
 
 IRQ
   devm_free_irq()
@@ -392,8 +390,16 @@ PCI
   devm_pci_alloc_host_bridge()  : managed PCI host bridge allocation
   devm_pci_remap_cfgspace()	: ioremap PCI configuration space
   devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
+
   pcim_enable_device()		: after success, all PCI ops become managed
+  pcim_iomap()			: do iomap() on a single BAR
+  pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
+  pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
+  pcim_iomap_table()		: array of mapped addresses indexed by BAR
+  pcim_iounmap()		: do iounmap() on a single BAR
+  pcim_iounmap_regions()	: do iounmap() and release_region() on multiple BARs
   pcim_pin_device()		: keep PCI device enabled after release
+  pcim_set_mwi()		: enable Memory-Write-Invalidate PCI transaction
 
 PHY
   devm_usb_get_phy()
Signature · 1 line
2.40.0.1.gaa8946217a0b
maintainer Applied
#2 lore raw
In reply to Andy Shevchenko
Quoted 7 lines · Andy Shevchenko

There were many changes to PCI core in scope of managed resources APIs. Update documentation to list the current state of affairs.

---
 Documentation/driver-api/driver-model/devres.rst | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

Applied, thanks.

jon