Skip to contentSkip to conversation

docs: interconnect: Improve API documentation coverage

PATCH In review Kuan-Wei Chiu 2 participants 4 messages Mar 12 – Mar 17

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

cover docs: interconnect: Improve API documentation coverage

Improve the generic interconnect subsystem documentation by including the existing kernel-doc comments from the source files.

Currently, the documentation only includes the provider data structures from the header file and incorrectly states that consumer APIs are undocumented.

Since drivers/interconnect/core.c contains a mix of both provider and consumer APIs, this series uses the kernel-doc :functions: directive to properly separate and document them in their respective sections.

Kuan-Wei Chiu (2):
docs: interconnect: Add provider APIs to documentation
docs: interconnect: Document consumer APIs and drop outdated text

 Documentation/driver-api/interconnect.rst | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.53.0.851.ga537e3e6e9-goog
#1 lore raw

PATCH 1/2 docs: interconnect: Add provider APIs to documentation

The "Interconnect providers" section currently only includes data structures from include/linux/interconnect-provider.h.

Include drivers/interconnect/core.c to extract provider-specific API documentation. The :functions: directive is used to prevent mixing with consumer APIs.

---
 Documentation/driver-api/interconnect.rst | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/driver-api/interconnect.rst +6 -0
index a92d0f277a1f..cf7a83f8c953 100644
@@ -84,6 +84,12 @@ be registered with the interconnect provider core.
 
 .. kernel-doc:: include/linux/interconnect-provider.h
 
+.. kernel-doc:: drivers/interconnect/core.c
+   :functions: icc_provider_init icc_provider_register icc_provider_deregister
+               icc_node_create icc_node_create_dyn icc_node_destroy
+               icc_node_add icc_node_del icc_nodes_remove icc_node_set_name
+               icc_link_create icc_link_nodes
+
 Interconnect consumers
 ----------------------
 
Signature · 1 line
2.53.0.851.ga537e3e6e9-goog
#2 lore raw

PATCH 2/2 docs: interconnect: Document consumer APIs and drop outdated text

In reply to Kuan-Wei Chiu

The documentation currently states that consumer interfaces are not documented, which is no longer true.

Remove the outdated claim and include the existing kernel-doc from drivers/interconnect/core.c (filtered for consumer APIs) and drivers/interconnect/bulk.c.

---
 Documentation/driver-api/interconnect.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
Documentation/driver-api/interconnect.rst +8 -2
index cf7a83f8c953..cebb77b49d8d 100644
@@ -95,8 +95,14 @@ Interconnect consumers
 
 Interconnect consumers are the clients which use the interconnect APIs to
 get paths between endpoints and set their bandwidth/latency/QoS requirements
-for these interconnect paths.  These interfaces are not currently
-documented.
+for these interconnect paths.
+
+.. kernel-doc:: drivers/interconnect/core.c
+   :functions: devm_of_icc_get of_icc_get_by_index of_icc_get icc_get
+               icc_put icc_enable icc_disable icc_set_bw icc_set_tag
+               icc_get_name
+
+.. kernel-doc:: drivers/interconnect/bulk.c
 
 Interconnect debugfs interfaces
 -------------------------------
Signature · 1 line
2.53.0.851.ga537e3e6e9-goog
maintainer
#3 lore raw
In reply to Kuan-Wei Chiu
Quoted 11 lines · Kuan-Wei Chiu

Improve the generic interconnect subsystem documentation by including the existing kernel-doc comments from the source files.

Currently, the documentation only includes the provider data structures from the header file and incorrectly states that consumer APIs are undocumented.

Since drivers/interconnect/core.c contains a mix of both provider and consumer APIs, this series uses the kernel-doc :functions: directive to properly separate and document them in their respective sections.

Quoted 6 lines

Kuan-Wei Chiu (2):
docs: interconnect: Add provider APIs to documentation
docs: interconnect: Document consumer APIs and drop outdated text

 Documentation/driver-api/interconnect.rst | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

Series applied, thanks.

jon