Skip to contentSkip to conversation

Documentation: devres: add missing mailbox helpers

PATCH In review anish kumar 3 participants 5 messages Nov 6, 2024 – Nov 12, 2024

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

PATCH 1/2 Documentation: devres: add missing mailbox helpers

mailbox api's were missing from the devres documentation. This patch adds them.

---
 Documentation/driver-api/driver-model/devres.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/driver-api/driver-model/devres.rst +4 -0
index 5f2ee8d717b1..8350a098f81f 100644
@@ -346,6 +346,10 @@ LED
   devm_led_trigger_register()
   devm_of_led_get()
 
+MAILBOX
+  devm_mbox_controller_register()
+  devm_mbox_controller_unregister()
+
 MDIO
   devm_mdiobus_alloc()
   devm_mdiobus_alloc_size()
Signature · 1 line
2.39.3 (Apple Git-146)
#1 lore raw

PATCH 2/2 Documentation: devres: add missing remoteproc helpers

remoteproc helpers were missing from the devres documentation. This patch adds them.

---
 Documentation/driver-api/driver-model/devres.rst | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/driver-api/driver-model/devres.rst +6 -0
index 8350a098f81f..7bf06e5c9274 100644
@@ -448,6 +448,12 @@ REGULATOR
   devm_regulator_register_supply_alias()
   devm_regulator_unregister_notifier()
 
+REMOTEPROC
+  devm_rproc_add()
+  devm_rproc_free()
+  devm_rproc_alloc()
+  devm_rproc_remove()
+
 RESET
   devm_reset_control_get()
   devm_reset_controller_register()
Signature · 1 line
2.39.3 (Apple Git-146)
#2 lore raw
In reply to anish kumar
Quoted 2 lines · anish kumar

mailbox api's were missing from the devres documentation. This patch adds them.

I've been wondering... Is it really that useful to have all of the devn_ functions listed in the documentation?

My opinion is no, we can grep the source code for these if we want to find them and we should just delete these lists instead of spending effort trying to keep them up-to-date.

Or if the consensus is yes it is useful, maybe we should add something in checkpatch to avoid missing these like we do for MAINTAINERS?

Quoted 21 lines
---
 Documentation/driver-api/driver-model/devres.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/driver-api/driver-model/devres.rst +4 -0
index 5f2ee8d717b1..8350a098f81f 100644
@@ -346,6 +346,10 @@ LED
   devm_led_trigger_register()
   devm_of_led_get()
 
+MAILBOX
+  devm_mbox_controller_register()
+  devm_mbox_controller_unregister()
+
 MDIO
   devm_mdiobus_alloc()
   devm_mdiobus_alloc_size()
#3 lore raw
Quoted 10 lines · David Lechner
Quoted 2 lines · anish kumar

mailbox api's were missing from the devres documentation. This patch adds them.

I've been wondering... Is it really that useful to have all of the devn_ functions listed in the documentation?

My opinion is no, we can grep the source code for these if we want to find them and we should just delete these lists

Agreed.

Quoted 5 lines

instead of spending effort trying to keep them up-to-date.

Or if the consensus is yes it is useful, maybe we should add something in checkpatch to avoid missing these like we do for MAINTAINERS?

excellent idea, checkpatch can warn if a corresponding devm_* variant is available and the patch is not utilizing it.

Quoted 23 lines
Quoted 22 lines
---
 Documentation/driver-api/driver-model/devres.rst | 4 ++++
 1 file changed, 4 insertions(+)
Documentation/driver-api/driver-model/devres.rst +4 -0
index 5f2ee8d717b1..8350a098f81f 100644
@@ -346,6 +346,10 @@ LED
   devm_led_trigger_register()
   devm_of_led_get()
 
+MAILBOX
+  devm_mbox_controller_register()
+  devm_mbox_controller_unregister()
+
 MDIO
   devm_mdiobus_alloc()
   devm_mdiobus_alloc_size()
maintainer
#4 lore raw
In reply to David Lechner
Quoted 6 lines · David Lechner
Quoted 2 lines · anish kumar

mailbox api's were missing from the devres documentation. This patch adds them.

I've been wondering... Is it really that useful to have all of the devn_ functions listed in the documentation?

Not particularly, no.

Far better would be to use the docs build system to bring in the kerneldoc comments that are there for at least a good subset of those functions.

Thanks,

jon