Skip to content

Commit b7b3773

Browse files
Jiri Slaby (SUSE)KAGA-KOKO
authored andcommitted
irqdomain: Fix the kernel-doc and plug it into Documentation
There were several undocumented fields in structs irq_domain_ops and irq_domain_info. Document them. irq_domain_ops::revmap_size contained "[]" in the description, which is not allowed in sphinx. Remove that. Finally, plug the whole header (irqdomain.h) into genericirq.rst, so that the docs is autogenerated and hyperlinks to these structure are created. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Link: https://lore.kernel.org/r/20240712064148.157040-1-jirislaby@kernel.org
1 parent c37927a commit b7b3773

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

Documentation/core-api/genericirq.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ which are used in the generic IRQ layer.
410410
.. kernel-doc:: include/linux/interrupt.h
411411
:internal:
412412

413+
.. kernel-doc:: include/linux/irqdomain.h
414+
413415
Public Functions Provided
414416
=========================
415417

include/linux/irqdomain.h

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,24 @@ void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args,
7474
* struct irq_domain_ops - Methods for irq_domain objects
7575
* @match: Match an interrupt controller device node to a host, returns
7676
* 1 on a match
77+
* @select: Match an interrupt controller fw specification. It is more generic
78+
* than @match as it receives a complete struct irq_fwspec. Therefore,
79+
* @select is preferred if provided. Returns 1 on a match.
7780
* @map: Create or update a mapping between a virtual irq number and a hw
7881
* irq number. This is called only once for a given mapping.
7982
* @unmap: Dispose of such a mapping
8083
* @xlate: Given a device tree node and interrupt specifier, decode
8184
* the hardware irq number and linux irq type value.
85+
* @alloc: Allocate @nr_irqs interrupts starting from @virq.
86+
* @free: Free @nr_irqs interrupts starting from @virq.
87+
* @activate: Activate one interrupt in HW (@irqd). If @reserve is set, only
88+
* reserve the vector. If unset, assign the vector (called from
89+
* request_irq()).
90+
* @deactivate: Disarm one interrupt (@irqd).
91+
* @translate: Given @fwspec, decode the hardware irq number (@out_hwirq) and
92+
* linux irq type value (@out_type). This is a generalised @xlate
93+
* (over struct irq_fwspec) and is preferred if provided.
94+
* @debug_show: For domains to show specific data for an interrupt in debugfs.
8295
*
8396
* Functions below are provided by the driver and called whenever a new mapping
8497
* is created or an old mapping is disposed. The driver can then proceed to
@@ -131,6 +144,9 @@ struct irq_domain_chip_generic;
131144
* Optional elements:
132145
* @fwnode: Pointer to firmware node associated with the irq_domain. Pretty easy
133146
* to swap it for the of_node via the irq_domain_get_of_node accessor
147+
* @bus_token: @fwnode's device_node might be used for several irq domains. But
148+
* in connection with @bus_token, the pair shall be unique in a
149+
* system.
134150
* @gc: Pointer to a list of generic chips. There is a helper function for
135151
* setting up one or more generic chips for interrupt controllers
136152
* drivers using the generic chip library which uses this pointer.
@@ -144,7 +160,9 @@ struct irq_domain_chip_generic;
144160
* @exit: Function called when the domain is destroyed
145161
*
146162
* Revmap data, used internally by the irq domain code:
147-
* @revmap_size: Size of the linear map table @revmap[]
163+
* @hwirq_max: Top limit for the HW irq number. Especially to avoid
164+
* conflicts/failures with reserved HW irqs. Can be ~0.
165+
* @revmap_size: Size of the linear map table @revmap
148166
* @revmap_tree: Radix map tree for hwirqs that don't fit in the linear map
149167
* @revmap: Linear table of irq_data pointers
150168
*/

0 commit comments

Comments
 (0)