[PATCH v2 2/6] Documentation/driver-api: Update pcim_enable_device()

Philipp Stanner posted 6 patches 7 months, 1 week ago
[PATCH v2 2/6] Documentation/driver-api: Update pcim_enable_device()
Posted by Philipp Stanner 7 months, 1 week ago
pcim_enable_device() is not related anymore to switching the mode of
operation of any functions. It merely sets up a devres callback for
automatically disabling the PCI device on driver detach.

Adjust the function's documentation.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 Documentation/driver-api/driver-model/devres.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
index d75728eb05f8..9443911c4742 100644
--- a/Documentation/driver-api/driver-model/devres.rst
+++ b/Documentation/driver-api/driver-model/devres.rst
@@ -391,7 +391,7 @@ PCI
   devm_pci_remap_cfgspace()	: ioremap PCI configuration space
   devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
 
-  pcim_enable_device()		: after success, some PCI ops become managed
+  pcim_enable_device()		: after success, PCI dev gets deactivated automatically
   pcim_iomap()			: do iomap() on a single BAR
   pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
   pcim_iomap_table()		: array of mapped addresses indexed by BAR
-- 
2.49.0
Re: [PATCH v2 2/6] Documentation/driver-api: Update pcim_enable_device()
Posted by ALOK TIWARI 7 months ago

On 16-05-2025 23:11, Philipp Stanner wrote:
> pcim_enable_device() is not related anymore to switching the mode of
> operation of any functions. It merely sets up a devres callback for
> automatically disabling the PCI device on driver detach.
> 
> Adjust the function's documentation.
> 
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
> ---
>   Documentation/driver-api/driver-model/devres.rst | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
> index d75728eb05f8..9443911c4742 100644
> --- a/Documentation/driver-api/driver-model/devres.rst
> +++ b/Documentation/driver-api/driver-model/devres.rst
> @@ -391,7 +391,7 @@ PCI
>     devm_pci_remap_cfgspace()	: ioremap PCI configuration space
>     devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
>   
> -  pcim_enable_device()		: after success, some PCI ops become managed
> +  pcim_enable_device()		: after success, PCI dev gets deactivated automatically

PCI dev -> PCI device
something like this if work ?"after success, PCI device disables 
automatically once driver detaches"

>     pcim_iomap()			: do iomap() on a single BAR
>     pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
>     pcim_iomap_table()		: array of mapped addresses indexed by BAR


Thanks,
Alok
Re: [PATCH v2 2/6] Documentation/driver-api: Update pcim_enable_device()
Posted by Randy Dunlap 7 months ago
Hi,

On 5/16/25 10:41 AM, Philipp Stanner wrote:
> pcim_enable_device() is not related anymore to switching the mode of
> operation of any functions. It merely sets up a devres callback for
> automatically disabling the PCI device on driver detach.
> 
> Adjust the function's documentation.
> 
> Signed-off-by: Philipp Stanner <phasta@kernel.org>
> ---
>  Documentation/driver-api/driver-model/devres.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
> index d75728eb05f8..9443911c4742 100644
> --- a/Documentation/driver-api/driver-model/devres.rst
> +++ b/Documentation/driver-api/driver-model/devres.rst
> @@ -391,7 +391,7 @@ PCI
>    devm_pci_remap_cfgspace()	: ioremap PCI configuration space
>    devm_pci_remap_cfg_resource()	: ioremap PCI configuration space resource
>  
> -  pcim_enable_device()		: after success, some PCI ops become managed
> +  pcim_enable_device()		: after success, PCI dev gets deactivated automatically

I think that the patch description has a better comment that could be put here. ^^^^^

>    pcim_iomap()			: do iomap() on a single BAR
>    pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
>    pcim_iomap_table()		: array of mapped addresses indexed by BAR

-- 
~Randy