Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'irq-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq cleanups from Thomas Gleixner:
"A set of cleanups for the generic interrupt subsystem:

- Consolidate on one set of functions for the interrupt domain code
to get rid of pointlessly duplicated code with only marginal
different semantics.

- Update the documentation accordingly and consolidate the coding
style of the irqdomain header"

* tag 'irq-cleanups-2025-05-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits)
irqdomain: Consolidate coding style
irqdomain: Fix kernel-doc and add it to Documentation
Documentation: irqdomain: Update it
Documentation: irq-domain.rst: Simple improvements
Documentation: irq/concepts: Minor improvements
Documentation: irq/concepts: Add commas and reflow
irqdomain: Improve kernel-docs of functions
irqdomain: Make struct irq_domain_info variables const
irqdomain: Use irq_domain_instantiate()'s return value as initializers
irqdomain: Drop irq_linear_revmap()
pinctrl: keembay: Switch to irq_find_mapping()
irqchip/armada-370-xp: Switch to irq_find_mapping()
gpu: ipu-v3: Switch to irq_find_mapping()
gpio: idt3243x: Switch to irq_find_mapping()
sh: Switch to irq_find_mapping()
powerpc: Switch to irq_find_mapping()
irqdomain: Drop irq_domain_add_*() functions
powerpc: Switch irq_domain_add_nomap() to use fwnode
thermal: Switch to irq_domain_create_linear()
soc: Switch to irq_domain_create_*()
...

+897 -992
-2
Documentation/core-api/genericirq.rst
··· 410 410 .. kernel-doc:: include/linux/interrupt.h 411 411 :internal: 412 412 413 - .. kernel-doc:: include/linux/irqdomain.h 414 - 415 413 Public Functions Provided 416 414 ========================= 417 415
+14 -13
Documentation/core-api/irq/concepts.rst
··· 2 2 What is an IRQ? 3 3 =============== 4 4 5 - An IRQ is an interrupt request from a device. 6 - Currently they can come in over a pin, or over a packet. 7 - Several devices may be connected to the same pin thus 8 - sharing an IRQ. 5 + An IRQ is an interrupt request from a device. Currently, they can come 6 + in over a pin, or over a packet. Several devices may be connected to 7 + the same pin thus sharing an IRQ. Such as on legacy PCI bus: All devices 8 + typically share 4 lanes/pins. Note that each device can request an 9 + interrupt on each of the lanes. 9 10 10 11 An IRQ number is a kernel identifier used to talk about a hardware 11 - interrupt source. Typically this is an index into the global irq_desc 12 - array, but except for what linux/interrupt.h implements the details 13 - are architecture specific. 12 + interrupt source. Typically, this is an index into the global irq_desc 13 + array or sparse_irqs tree. But except for what linux/interrupt.h 14 + implements, the details are architecture specific. 14 15 15 16 An IRQ number is an enumeration of the possible interrupt sources on a 16 - machine. Typically what is enumerated is the number of input pins on 17 - all of the interrupt controller in the system. In the case of ISA 18 - what is enumerated are the 16 input pins on the two i8259 interrupt 19 - controllers. 17 + machine. Typically, what is enumerated is the number of input pins on 18 + all of the interrupt controllers in the system. In the case of ISA, 19 + what is enumerated are the 8 input pins on each of the two i8259 20 + interrupt controllers. 20 21 21 22 Architectures can assign additional meaning to the IRQ numbers, and 22 - are encouraged to in the case where there is any manual configuration 23 - of the hardware involved. The ISA IRQs are a classic example of 23 + are encouraged to in the case where there is any manual configuration 24 + of the hardware involved. The ISA IRQs are a classic example of 24 25 assigning this kind of additional meaning.
+111 -88
Documentation/core-api/irq/irq-domain.rst
··· 1 1 =============================================== 2 - The irq_domain interrupt number mapping library 2 + The irq_domain Interrupt Number Mapping Library 3 3 =============================================== 4 4 5 5 The current design of the Linux kernel uses a single large number 6 - space where each separate IRQ source is assigned a different number. 7 - This is simple when there is only one interrupt controller, but in 8 - systems with multiple interrupt controllers the kernel must ensure 6 + space where each separate IRQ source is assigned a unique number. 7 + This is simple when there is only one interrupt controller. But in 8 + systems with multiple interrupt controllers, the kernel must ensure 9 9 that each one gets assigned non-overlapping allocations of Linux 10 10 IRQ numbers. 11 11 12 12 The number of interrupt controllers registered as unique irqchips 13 - show a rising tendency: for example subdrivers of different kinds 13 + shows a rising tendency. For example, subdrivers of different kinds 14 14 such as GPIO controllers avoid reimplementing identical callback 15 15 mechanisms as the IRQ core system by modelling their interrupt 16 - handlers as irqchips, i.e. in effect cascading interrupt controllers. 16 + handlers as irqchips. I.e. in effect cascading interrupt controllers. 17 17 18 - Here the interrupt number loose all kind of correspondence to 19 - hardware interrupt numbers: whereas in the past, IRQ numbers could 20 - be chosen so they matched the hardware IRQ line into the root 21 - interrupt controller (i.e. the component actually fireing the 22 - interrupt line to the CPU) nowadays this number is just a number. 18 + So in the past, IRQ numbers could be chosen so that they match the 19 + hardware IRQ line into the root interrupt controller (i.e. the 20 + component actually firing the interrupt line to the CPU). Nowadays, 21 + this number is just a number and the number loose all kind of 22 + correspondence to hardware interrupt numbers. 23 23 24 - For this reason we need a mechanism to separate controller-local 25 - interrupt numbers, called hardware irq's, from Linux IRQ numbers. 24 + For this reason, we need a mechanism to separate controller-local 25 + interrupt numbers, called hardware IRQs, from Linux IRQ numbers. 26 26 27 27 The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of 28 - irq numbers, but they don't provide any support for reverse mapping of 28 + IRQ numbers, but they don't provide any support for reverse mapping of 29 29 the controller-local IRQ (hwirq) number into the Linux IRQ number 30 30 space. 31 31 32 - The irq_domain library adds mapping between hwirq and IRQ numbers on 33 - top of the irq_alloc_desc*() API. An irq_domain to manage mapping is 34 - preferred over interrupt controller drivers open coding their own 32 + The irq_domain library adds a mapping between hwirq and IRQ numbers on 33 + top of the irq_alloc_desc*() API. An irq_domain to manage the mapping 34 + is preferred over interrupt controller drivers open coding their own 35 35 reverse mapping scheme. 36 36 37 - irq_domain also implements translation from an abstract irq_fwspec 38 - structure to hwirq numbers (Device Tree and ACPI GSI so far), and can 39 - be easily extended to support other IRQ topology data sources. 37 + irq_domain also implements a translation from an abstract struct 38 + irq_fwspec to hwirq numbers (Device Tree, non-DT firmware node, ACPI 39 + GSI, and software node so far), and can be easily extended to support 40 + other IRQ topology data sources. The implementation is performed 41 + without any extra platform support code. 40 42 41 - irq_domain usage 43 + irq_domain Usage 42 44 ================ 45 + struct irq_domain could be defined as an irq domain controller. That 46 + is, it handles the mapping between hardware and virtual interrupt 47 + numbers for a given interrupt domain. The domain structure is 48 + generally created by the PIC code for a given PIC instance (though a 49 + domain can cover more than one PIC if they have a flat number model). 50 + It is the domain callbacks that are responsible for setting the 51 + irq_chip on a given irq_desc after it has been mapped. 43 52 44 - An interrupt controller driver creates and registers an irq_domain by 45 - calling one of the irq_domain_add_*() or irq_domain_create_*() functions 46 - (each mapping method has a different allocator function, more on that later). 47 - The function will return a pointer to the irq_domain on success. The caller 48 - must provide the allocator function with an irq_domain_ops structure. 53 + The host code and data structures use a fwnode_handle pointer to 54 + identify the domain. In some cases, and in order to preserve source 55 + code compatibility, this fwnode pointer is "upgraded" to a DT 56 + device_node. For those firmware infrastructures that do not provide a 57 + unique identifier for an interrupt controller, the irq_domain code 58 + offers a fwnode allocator. 59 + 60 + An interrupt controller driver creates and registers a struct irq_domain 61 + by calling one of the irq_domain_create_*() functions (each mapping 62 + method has a different allocator function, more on that later). The 63 + function will return a pointer to the struct irq_domain on success. The 64 + caller must provide the allocator function with a struct irq_domain_ops 65 + pointer. 49 66 50 67 In most cases, the irq_domain will begin empty without any mappings 51 68 between hwirq and IRQ numbers. Mappings are added to the irq_domain 52 69 by calling irq_create_mapping() which accepts the irq_domain and a 53 - hwirq number as arguments. If a mapping for the hwirq doesn't already 54 - exist then it will allocate a new Linux irq_desc, associate it with 55 - the hwirq, and call the .map() callback so the driver can perform any 56 - required hardware setup. 70 + hwirq number as arguments. If a mapping for the hwirq doesn't already 71 + exist, irq_create_mapping() allocates a new Linux irq_desc, associates 72 + it with the hwirq, and calls the :c:member:`irq_domain_ops.map()` 73 + callback. In there, the driver can perform any required hardware 74 + setup. 57 75 58 76 Once a mapping has been established, it can be retrieved or used via a 59 77 variety of methods: ··· 81 63 mapping. 82 64 - irq_find_mapping() returns a Linux IRQ number for a given domain and 83 65 hwirq number, and 0 if there was no mapping 84 - - irq_linear_revmap() is now identical to irq_find_mapping(), and is 85 - deprecated 86 66 - generic_handle_domain_irq() handles an interrupt described by a 87 67 domain and a hwirq number 88 68 ··· 93 77 94 78 If the driver has the Linux IRQ number or the irq_data pointer, and 95 79 needs to know the associated hwirq number (such as in the irq_chip 96 - callbacks) then it can be directly obtained from irq_data->hwirq. 80 + callbacks) then it can be directly obtained from 81 + :c:member:`irq_data.hwirq`. 97 82 98 - Types of irq_domain mappings 83 + Types of irq_domain Mappings 99 84 ============================ 100 85 101 86 There are several mechanisms available for reverse mapping from hwirq ··· 109 92 110 93 :: 111 94 112 - irq_domain_add_linear() 113 95 irq_domain_create_linear() 114 96 115 97 The linear reverse map maintains a fixed size table indexed by the ··· 121 105 allocated for in-use IRQs. The disadvantage is that the table must be 122 106 as large as the largest possible hwirq number. 123 107 124 - irq_domain_add_linear() and irq_domain_create_linear() are functionally 125 - equivalent, except for the first argument is different - the former 126 - accepts an Open Firmware specific 'struct device_node', while the latter 127 - accepts a more general abstraction 'struct fwnode_handle'. 128 - 129 - The majority of drivers should use the linear map. 108 + The majority of drivers should use the Linear map. 130 109 131 110 Tree 132 111 ---- 133 112 134 113 :: 135 114 136 - irq_domain_add_tree() 137 115 irq_domain_create_tree() 138 116 139 117 The irq_domain maintains a radix tree map from hwirq numbers to Linux ··· 139 129 hwirq number. The disadvantage is that hwirq to IRQ number lookup is 140 130 dependent on how many entries are in the table. 141 131 142 - irq_domain_add_tree() and irq_domain_create_tree() are functionally 143 - equivalent, except for the first argument is different - the former 144 - accepts an Open Firmware specific 'struct device_node', while the latter 145 - accepts a more general abstraction 'struct fwnode_handle'. 146 - 147 132 Very few drivers should need this mapping. 148 133 149 134 No Map ··· 146 141 147 142 :: 148 143 149 - irq_domain_add_nomap() 144 + irq_domain_create_nomap() 150 145 151 146 The No Map mapping is to be used when the hwirq number is 152 147 programmable in the hardware. In this case it is best to program the ··· 164 159 165 160 :: 166 161 167 - irq_domain_add_simple() 168 - irq_domain_add_legacy() 169 162 irq_domain_create_simple() 170 163 irq_domain_create_legacy() 171 164 ··· 192 189 mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ 193 190 numbers. 194 191 195 - Most users of legacy mappings should use irq_domain_add_simple() or 196 - irq_domain_create_simple() which will use a legacy domain only if an IRQ range 197 - is supplied by the system and will otherwise use a linear domain mapping. 198 - The semantics of this call are such that if an IRQ range is specified then 199 - descriptors will be allocated on-the-fly for it, and if no range is 200 - specified it will fall through to irq_domain_add_linear() or 201 - irq_domain_create_linear() which means *no* irq descriptors will be allocated. 192 + Most users of legacy mappings should use irq_domain_create_simple() 193 + which will use a legacy domain only if an IRQ range is supplied by the 194 + system and will otherwise use a linear domain mapping. The semantics of 195 + this call are such that if an IRQ range is specified then descriptors 196 + will be allocated on-the-fly for it, and if no range is specified it 197 + will fall through to irq_domain_create_linear() which means *no* irq 198 + descriptors will be allocated. 202 199 203 200 A typical use case for simple domains is where an irqchip provider 204 201 is supporting both dynamic and static IRQ assignments. ··· 209 206 before any irq_find_mapping() since the latter will actually work 210 207 for the static IRQ assignment case. 211 208 212 - irq_domain_add_simple() and irq_domain_create_simple() as well as 213 - irq_domain_add_legacy() and irq_domain_create_legacy() are functionally 214 - equivalent, except for the first argument is different - the former 215 - accepts an Open Firmware specific 'struct device_node', while the latter 216 - accepts a more general abstraction 'struct fwnode_handle'. 217 - 218 - Hierarchy IRQ domain 209 + Hierarchy IRQ Domain 219 210 -------------------- 220 211 221 212 On some architectures, there may be multiple interrupt controllers ··· 250 253 4) irq_domain_deactivate_irq(): deactivate interrupt controller hardware 251 254 to stop delivering the interrupt. 252 255 253 - Following changes are needed to support hierarchy irq_domain: 256 + The following is needed to support hierarchy irq_domain: 254 257 255 - 1) a new field 'parent' is added to struct irq_domain; it's used to 258 + 1) The :c:member:`parent` field in struct irq_domain is used to 256 259 maintain irq_domain hierarchy information. 257 - 2) a new field 'parent_data' is added to struct irq_data; it's used to 258 - build hierarchy irq_data to match hierarchy irq_domains. The irq_data 259 - is used to store irq_domain pointer and hardware irq number. 260 - 3) new callbacks are added to struct irq_domain_ops to support hierarchy 261 - irq_domain operations. 260 + 2) The :c:member:`parent_data` field in struct irq_data is used to 261 + build hierarchy irq_data to match hierarchy irq_domains. The 262 + irq_data is used to store irq_domain pointer and hardware irq 263 + number. 264 + 3) The :c:member:`alloc()`, :c:member:`free()`, and other callbacks in 265 + struct irq_domain_ops to support hierarchy irq_domain operations. 262 266 263 - With support of hierarchy irq_domain and hierarchy irq_data ready, an 264 - irq_domain structure is built for each interrupt controller, and an 267 + With the support of hierarchy irq_domain and hierarchy irq_data ready, 268 + an irq_domain structure is built for each interrupt controller, and an 265 269 irq_data structure is allocated for each irq_domain associated with an 266 - IRQ. Now we could go one step further to support stacked(hierarchy) 270 + IRQ. 271 + 272 + For an interrupt controller driver to support hierarchy irq_domain, it 273 + needs to: 274 + 275 + 1) Implement irq_domain_ops.alloc() and irq_domain_ops.free() 276 + 2) Optionally, implement irq_domain_ops.activate() and 277 + irq_domain_ops.deactivate(). 278 + 3) Optionally, implement an irq_chip to manage the interrupt controller 279 + hardware. 280 + 4) There is no need to implement irq_domain_ops.map() and 281 + irq_domain_ops.unmap(). They are unused with hierarchy irq_domain. 282 + 283 + Note the hierarchy irq_domain is in no way x86-specific, and is 284 + heavily used to support other architectures, such as ARM, ARM64 etc. 285 + 286 + Stacked irq_chip 287 + ~~~~~~~~~~~~~~~~ 288 + 289 + Now, we could go one step further to support stacked (hierarchy) 267 290 irq_chip. That is, an irq_chip is associated with each irq_data along 268 291 the hierarchy. A child irq_chip may implement a required action by 269 292 itself or by cooperating with its parent irq_chip. ··· 293 276 parent irq_chip when needed. So we could achieve a much cleaner 294 277 software architecture. 295 278 296 - For an interrupt controller driver to support hierarchy irq_domain, it 297 - needs to: 298 - 299 - 1) Implement irq_domain_ops.alloc and irq_domain_ops.free 300 - 2) Optionally implement irq_domain_ops.activate and 301 - irq_domain_ops.deactivate. 302 - 3) Optionally implement an irq_chip to manage the interrupt controller 303 - hardware. 304 - 4) No need to implement irq_domain_ops.map and irq_domain_ops.unmap, 305 - they are unused with hierarchy irq_domain. 306 - 307 - Hierarchy irq_domain is in no way x86 specific, and is heavily used to 308 - support other architectures, such as ARM, ARM64 etc. 309 - 310 279 Debugging 311 280 ========= 312 281 313 282 Most of the internals of the IRQ subsystem are exposed in debugfs by 314 283 turning CONFIG_GENERIC_IRQ_DEBUGFS on. 284 + 285 + Structures and Public Functions Provided 286 + ======================================== 287 + 288 + This chapter contains the autogenerated documentation of the structures 289 + and exported kernel API functions which are used for IRQ domains. 290 + 291 + .. kernel-doc:: include/linux/irqdomain.h 292 + 293 + .. kernel-doc:: kernel/irq/irqdomain.c 294 + :export: 295 + 296 + Internal Functions Provided 297 + =========================== 298 + 299 + This chapter contains the autogenerated documentation of the internal 300 + functions. 301 + 302 + .. kernel-doc:: kernel/irq/irqdomain.c 303 + :internal:
+1 -7
Documentation/translations/zh_CN/core-api/irq/irq-domain.rst
··· 60 60 61 61 - irq_find_mapping()返回给定域和hwirq的Linux IRQ号,如果没有映射则返回0。 62 62 63 - - irq_linear_revmap()现与irq_find_mapping()相同,已被废弃。 64 - 65 63 - generic_handle_domain_irq()处理一个由域和hwirq号描述的中断。 66 64 67 65 请注意,irq域的查找必须发生在与RCU读临界区兼容的上下文中。 ··· 81 83 82 84 :: 83 85 84 - irq_domain_add_linear() 85 86 irq_domain_create_linear() 86 87 87 88 线性反向映射维护了一个固定大小的表,该表以hwirq号为索引。 当一个hwirq被映射 ··· 101 104 102 105 :: 103 106 104 - irq_domain_add_tree() 105 107 irq_domain_create_tree() 106 108 107 109 irq_domain维护着从hwirq号到Linux IRQ的radix的树状映射。 当一个hwirq被映射时, ··· 120 124 121 125 :: 122 126 123 - irq_domain_add_nomap() 127 + irq_domain_create_nomap() 124 128 125 129 当硬件中的hwirq号是可编程的时候,就可以采用无映射类型。 在这种情况下,最好将 126 130 Linux IRQ号编入硬件本身,这样就不需要映射了。 调用irq_create_direct_mapping() ··· 134 138 135 139 :: 136 140 137 - irq_domain_add_simple() 138 - irq_domain_add_legacy() 139 141 irq_domain_create_simple() 140 142 irq_domain_create_legacy() 141 143
+1 -1
arch/arc/kernel/intc-arcv2.c
··· 170 170 if (parent) 171 171 panic("DeviceTree incore intc not a root irq controller\n"); 172 172 173 - root_domain = irq_domain_add_linear(intc, nr_cpu_irqs, &arcv2_irq_ops, NULL); 173 + root_domain = irq_domain_create_linear(of_fwnode_handle(intc), nr_cpu_irqs, &arcv2_irq_ops, NULL); 174 174 if (!root_domain) 175 175 panic("root irq domain not avail\n"); 176 176
+3 -2
arch/arc/kernel/intc-compact.c
··· 112 112 if (parent) 113 113 panic("DeviceTree incore intc not a root irq controller\n"); 114 114 115 - root_domain = irq_domain_add_linear(intc, NR_CPU_IRQS, 116 - &arc_intc_domain_ops, NULL); 115 + root_domain = irq_domain_create_linear(of_fwnode_handle(intc), 116 + NR_CPU_IRQS, 117 + &arc_intc_domain_ops, NULL); 117 118 if (!root_domain) 118 119 panic("root irq domain not avail\n"); 119 120
+2 -1
arch/arc/kernel/mcip.c
··· 391 391 392 392 pr_info("MCIP: IDU supports %u common irqs\n", nr_irqs); 393 393 394 - domain = irq_domain_add_linear(intc, nr_irqs, &idu_irq_ops, NULL); 394 + domain = irq_domain_create_linear(of_fwnode_handle(intc), nr_irqs, 395 + &idu_irq_ops, NULL); 395 396 396 397 /* Parent interrupts (core-intc) are already mapped */ 397 398
+3 -3
arch/arm/common/sa1111.c
··· 416 416 writel_relaxed(~0, irqbase + SA1111_INTSTATCLR0); 417 417 writel_relaxed(~0, irqbase + SA1111_INTSTATCLR1); 418 418 419 - sachip->irqdomain = irq_domain_add_linear(NULL, SA1111_IRQ_NR, 420 - &sa1111_irqdomain_ops, 421 - sachip); 419 + sachip->irqdomain = irq_domain_create_linear(NULL, SA1111_IRQ_NR, 420 + &sa1111_irqdomain_ops, 421 + sachip); 422 422 if (!sachip->irqdomain) { 423 423 irq_free_descs(sachip->irq_base, SA1111_IRQ_NR); 424 424 return -ENOMEM;
+2 -3
arch/arm/mach-exynos/suspend.c
··· 209 209 return -ENOMEM; 210 210 } 211 211 212 - domain = irq_domain_add_hierarchy(parent_domain, 0, 0, 213 - node, &exynos_pmu_domain_ops, 214 - NULL); 212 + domain = irq_domain_create_hierarchy(parent_domain, 0, 0, of_fwnode_handle(node), 213 + &exynos_pmu_domain_ops, NULL); 215 214 if (!domain) { 216 215 iounmap(pmu_base_addr); 217 216 pmu_base_addr = NULL;
+2 -2
arch/arm/mach-imx/avic.c
··· 201 201 WARN_ON(irq_base < 0); 202 202 203 203 np = of_find_compatible_node(NULL, NULL, "fsl,avic"); 204 - domain = irq_domain_add_legacy(np, AVIC_NUM_IRQS, irq_base, 0, 205 - &irq_domain_simple_ops, NULL); 204 + domain = irq_domain_create_legacy(of_fwnode_handle(np), AVIC_NUM_IRQS, irq_base, 0, 205 + &irq_domain_simple_ops, NULL); 206 206 WARN_ON(!domain); 207 207 208 208 for (i = 0; i < AVIC_NUM_IRQS / 32; i++, irq_base += 32)
+2 -3
arch/arm/mach-imx/gpc.c
··· 245 245 if (WARN_ON(!gpc_base)) 246 246 return -ENOMEM; 247 247 248 - domain = irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS, 249 - node, &imx_gpc_domain_ops, 250 - NULL); 248 + domain = irq_domain_create_hierarchy(parent_domain, 0, GPC_MAX_IRQS, of_fwnode_handle(node), 249 + &imx_gpc_domain_ops, NULL); 251 250 if (!domain) { 252 251 iounmap(gpc_base); 253 252 return -ENOMEM;
+2 -2
arch/arm/mach-imx/tzic.c
··· 175 175 irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id()); 176 176 WARN_ON(irq_base < 0); 177 177 178 - domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0, 179 - &irq_domain_simple_ops, NULL); 178 + domain = irq_domain_create_legacy(of_fwnode_handle(np), TZIC_NUM_IRQS, irq_base, 0, 179 + &irq_domain_simple_ops, NULL); 180 180 WARN_ON(!domain); 181 181 182 182 for (i = 0; i < 4; i++, irq_base += 32)
+1 -2
arch/arm/mach-omap1/irq.c
··· 220 220 omap_l2_irq = irq_base; 221 221 omap_l2_irq -= NR_IRQS_LEGACY; 222 222 223 - domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0, 224 - &irq_domain_simple_ops, NULL); 223 + domain = irq_domain_create_legacy(NULL, nr_irqs, irq_base, 0, &irq_domain_simple_ops, NULL); 225 224 226 225 pr_info("Total of %lu interrupts in %i interrupt banks\n", 227 226 nr_irqs, irq_bank_count);
+2 -3
arch/arm/mach-omap2/omap-wakeupgen.c
··· 585 585 wakeupgen_ops = &am43xx_wakeupgen_ops; 586 586 } 587 587 588 - domain = irq_domain_add_hierarchy(parent_domain, 0, max_irqs, 589 - node, &wakeupgen_domain_ops, 590 - NULL); 588 + domain = irq_domain_create_hierarchy(parent_domain, 0, max_irqs, of_fwnode_handle(node), 589 + &wakeupgen_domain_ops, NULL); 591 590 if (!domain) { 592 591 iounmap(wakeupgen_base); 593 592 return -ENOMEM;
+2 -3
arch/arm/mach-pxa/irq.c
··· 147 147 int n; 148 148 149 149 pxa_internal_irq_nr = irq_nr; 150 - pxa_irq_domain = irq_domain_add_legacy(node, irq_nr, 151 - PXA_IRQ(0), 0, 152 - &pxa_irq_ops, NULL); 150 + pxa_irq_domain = irq_domain_create_legacy(of_fwnode_handle(node), irq_nr, PXA_IRQ(0), 0, 151 + &pxa_irq_ops, NULL); 153 152 if (!pxa_irq_domain) 154 153 panic("Unable to add PXA IRQ domain\n"); 155 154 irq_set_default_domain(pxa_irq_domain);
+6 -6
arch/arm/plat-orion/gpio.c
··· 600 600 IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); 601 601 602 602 /* Setup irq domain on top of the generic chip. */ 603 - ochip->domain = irq_domain_add_legacy(NULL, 604 - ochip->chip.ngpio, 605 - ochip->secondary_irq_base, 606 - ochip->secondary_irq_base, 607 - &irq_domain_simple_ops, 608 - ochip); 603 + ochip->domain = irq_domain_create_legacy(NULL, 604 + ochip->chip.ngpio, 605 + ochip->secondary_irq_base, 606 + ochip->secondary_irq_base, 607 + &irq_domain_simple_ops, 608 + ochip); 609 609 if (!ochip->domain) 610 610 panic("%s: couldn't allocate irq domain (DT).\n", 611 611 ochip->chip.label);
+2 -2
arch/mips/ath25/ar2315.c
··· 149 149 150 150 ath25_irq_dispatch = ar2315_irq_dispatch; 151 151 152 - domain = irq_domain_add_linear(NULL, AR2315_MISC_IRQ_COUNT, 153 - &ar2315_misc_irq_domain_ops, NULL); 152 + domain = irq_domain_create_linear(NULL, AR2315_MISC_IRQ_COUNT, 153 + &ar2315_misc_irq_domain_ops, NULL); 154 154 if (!domain) 155 155 panic("Failed to add IRQ domain"); 156 156
+2 -2
arch/mips/ath25/ar5312.c
··· 143 143 144 144 ath25_irq_dispatch = ar5312_irq_dispatch; 145 145 146 - domain = irq_domain_add_linear(NULL, AR5312_MISC_IRQ_COUNT, 147 - &ar5312_misc_irq_domain_ops, NULL); 146 + domain = irq_domain_create_linear(NULL, AR5312_MISC_IRQ_COUNT, 147 + &ar5312_misc_irq_domain_ops, NULL); 148 148 if (!domain) 149 149 panic("Failed to add IRQ domain"); 150 150
+13 -12
arch/mips/cavium-octeon/octeon-irq.c
··· 1503 1503 /* Mips internal */ 1504 1504 octeon_irq_init_core(); 1505 1505 1506 - ciu_domain = irq_domain_add_tree( 1507 - ciu_node, &octeon_irq_domain_ciu_ops, dd); 1506 + ciu_domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_irq_domain_ciu_ops, 1507 + dd); 1508 1508 irq_set_default_domain(ciu_domain); 1509 1509 1510 1510 /* CIU_0 */ ··· 1637 1637 if (gpiod) { 1638 1638 /* gpio domain host_data is the base hwirq number. */ 1639 1639 gpiod->base_hwirq = base_hwirq; 1640 - irq_domain_add_linear( 1641 - gpio_node, 16, &octeon_irq_domain_gpio_ops, gpiod); 1640 + irq_domain_create_linear(of_fwnode_handle(gpio_node), 16, 1641 + &octeon_irq_domain_gpio_ops, gpiod); 1642 1642 } else { 1643 1643 pr_warn("Cannot allocate memory for GPIO irq_domain.\n"); 1644 1644 return -ENOMEM; ··· 2074 2074 /* Mips internal */ 2075 2075 octeon_irq_init_core(); 2076 2076 2077 - ciu_domain = irq_domain_add_tree( 2078 - ciu_node, &octeon_irq_domain_ciu2_ops, NULL); 2077 + ciu_domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_irq_domain_ciu2_ops, 2078 + NULL); 2079 2079 irq_set_default_domain(ciu_domain); 2080 2080 2081 2081 /* CUI2 */ ··· 2331 2331 } 2332 2332 host_data->max_bits = val; 2333 2333 2334 - cib_domain = irq_domain_add_linear(ciu_node, host_data->max_bits, 2335 - &octeon_irq_domain_cib_ops, 2336 - host_data); 2334 + cib_domain = irq_domain_create_linear(of_fwnode_handle(ciu_node), 2335 + host_data->max_bits, 2336 + &octeon_irq_domain_cib_ops, 2337 + host_data); 2337 2338 if (!cib_domain) { 2338 - pr_err("ERROR: Couldn't irq_domain_add_linear()\n"); 2339 + pr_err("ERROR: Couldn't irq_domain_create_linear()\n"); 2339 2340 return -ENOMEM; 2340 2341 } 2341 2342 ··· 2919 2918 * Initialize all domains to use the default domain. Specific major 2920 2919 * blocks will overwrite the default domain as needed. 2921 2920 */ 2922 - domain = irq_domain_add_tree(ciu_node, &octeon_dflt_domain_ciu3_ops, 2923 - ciu3_info); 2921 + domain = irq_domain_create_tree(of_fwnode_handle(ciu_node), &octeon_dflt_domain_ciu3_ops, 2922 + ciu3_info); 2924 2923 for (i = 0; i < MAX_CIU3_DOMAINS; i++) 2925 2924 ciu3_info->domain[i] = domain; 2926 2925
+1 -1
arch/mips/lantiq/irq.c
··· 377 377 for (i = 0; i < MAX_IM; i++) 378 378 irq_set_chained_handler(i + 2, ltq_hw_irq_handler); 379 379 380 - ltq_domain = irq_domain_add_linear(node, 380 + ltq_domain = irq_domain_create_linear(of_fwnode_handle(node), 381 381 (MAX_IM * INT_NUM_IM_OFFSET) + MIPS_CPU_IRQ_CASCADE, 382 382 &irq_domain_ops, 0); 383 383
+2 -2
arch/mips/pci/pci-ar2315.c
··· 469 469 if (err) 470 470 return err; 471 471 472 - apc->domain = irq_domain_add_linear(NULL, AR2315_PCI_IRQ_COUNT, 473 - &ar2315_pci_irq_domain_ops, apc); 472 + apc->domain = irq_domain_create_linear(NULL, AR2315_PCI_IRQ_COUNT, 473 + &ar2315_pci_irq_domain_ops, apc); 474 474 if (!apc->domain) { 475 475 dev_err(dev, "failed to add IRQ domain\n"); 476 476 return -ENOMEM;
+4 -3
arch/mips/pci/pci-rt3883.c
··· 208 208 rt3883_pci_w32(rpc, 0, RT3883_PCI_REG_PCIENA); 209 209 210 210 rpc->irq_domain = 211 - irq_domain_add_linear(rpc->intc_of_node, RT3883_PCI_IRQ_COUNT, 212 - &rt3883_pci_irq_domain_ops, 213 - rpc); 211 + irq_domain_create_linear(of_fwnode_handle(rpc->intc_of_node), 212 + RT3883_PCI_IRQ_COUNT, 213 + &rt3883_pci_irq_domain_ops, 214 + rpc); 214 215 if (!rpc->irq_domain) { 215 216 dev_err(dev, "unable to add IRQ domain\n"); 216 217 return -ENODEV;
+1 -1
arch/mips/ralink/irq.c
··· 176 176 /* route all INTC interrupts to MIPS HW0 interrupt */ 177 177 rt_intc_w32(0, INTC_REG_TYPE); 178 178 179 - domain = irq_domain_add_legacy(node, RALINK_INTC_IRQ_COUNT, 179 + domain = irq_domain_create_legacy(of_fwnode_handle(node), RALINK_INTC_IRQ_COUNT, 180 180 RALINK_INTC_IRQ_BASE, 0, &irq_domain_ops, NULL); 181 181 if (!domain) 182 182 panic("Failed to add irqdomain");
+2 -1
arch/nios2/kernel/irq.c
··· 69 69 70 70 BUG_ON(!node); 71 71 72 - domain = irq_domain_add_linear(node, NIOS2_CPU_NR_IRQS, &irq_ops, NULL); 72 + domain = irq_domain_create_linear(of_fwnode_handle(node), 73 + NIOS2_CPU_NR_IRQS, &irq_ops, NULL); 73 74 BUG_ON(!domain); 74 75 75 76 irq_set_default_domain(domain);
+4 -3
arch/powerpc/platforms/44x/uic.c
··· 254 254 } 255 255 uic->dcrbase = *dcrreg; 256 256 257 - uic->irqhost = irq_domain_add_linear(node, NR_UIC_INTS, &uic_host_ops, 258 - uic); 257 + uic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 258 + NR_UIC_INTS, &uic_host_ops, 259 + uic); 259 260 if (! uic->irqhost) 260 261 return NULL; /* FIXME: panic? */ 261 262 ··· 328 327 msr = mfdcr(primary_uic->dcrbase + UIC_MSR); 329 328 src = 32 - ffs(msr); 330 329 331 - return irq_linear_revmap(primary_uic->irqhost, src); 330 + return irq_find_mapping(primary_uic->irqhost, src); 332 331 }
+2 -1
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
··· 188 188 189 189 cpld_pic_node = of_node_get(np); 190 190 191 - cpld_pic_host = irq_domain_add_linear(np, 16, &cpld_pic_host_ops, NULL); 191 + cpld_pic_host = irq_domain_create_linear(of_fwnode_handle(np), 16, 192 + &cpld_pic_host_ops, NULL); 192 193 if (!cpld_pic_host) { 193 194 printk(KERN_ERR "CPLD PIC: failed to allocate irq host!\n"); 194 195 goto end;
+1 -1
arch/powerpc/platforms/52xx/media5200.c
··· 168 168 169 169 spin_lock_init(&media5200_irq.lock); 170 170 171 - media5200_irq.irqhost = irq_domain_add_linear(fpga_np, 171 + media5200_irq.irqhost = irq_domain_create_linear(of_fwnode_handle(fpga_np), 172 172 MEDIA5200_NUM_IRQS, &media5200_irq_ops, &media5200_irq); 173 173 if (!media5200_irq.irqhost) 174 174 goto out;
+3 -3
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
··· 247 247 if (!cascade_virq) 248 248 return; 249 249 250 - gpt->irqhost = irq_domain_add_linear(node, 1, &mpc52xx_gpt_irq_ops, gpt); 250 + gpt->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 1, &mpc52xx_gpt_irq_ops, gpt); 251 251 if (!gpt->irqhost) { 252 - dev_err(gpt->dev, "irq_domain_add_linear() failed\n"); 252 + dev_err(gpt->dev, "irq_domain_create_linear() failed\n"); 253 253 return; 254 254 } 255 255 ··· 371 371 mutex_lock(&mpc52xx_gpt_list_mutex); 372 372 list_for_each(pos, &mpc52xx_gpt_list) { 373 373 gpt = container_of(pos, struct mpc52xx_gpt_priv, list); 374 - if (gpt->irqhost && irq == irq_linear_revmap(gpt->irqhost, 0)) { 374 + if (gpt->irqhost && irq == irq_find_mapping(gpt->irqhost, 0)) { 375 375 mutex_unlock(&mpc52xx_gpt_list_mutex); 376 376 return gpt; 377 377 }
+2 -2
arch/powerpc/platforms/52xx/mpc52xx_pic.c
··· 446 446 * As last step, add an irq host to translate the real 447 447 * hw irq information provided by the ofw to linux virq 448 448 */ 449 - mpc52xx_irqhost = irq_domain_add_linear(picnode, 449 + mpc52xx_irqhost = irq_domain_create_linear(of_fwnode_handle(picnode), 450 450 MPC52xx_IRQ_HIGHTESTHWIRQ, 451 451 &mpc52xx_irqhost_ops, NULL); 452 452 ··· 515 515 return 0; 516 516 } 517 517 518 - return irq_linear_revmap(mpc52xx_irqhost, irq); 518 + return irq_find_mapping(mpc52xx_irqhost, irq); 519 519 }
+2 -2
arch/powerpc/platforms/85xx/socrates_fpga_pic.c
··· 83 83 if (cause >> (i + 16)) 84 84 break; 85 85 } 86 - return irq_linear_revmap(socrates_fpga_pic_irq_host, 86 + return irq_find_mapping(socrates_fpga_pic_irq_host, 87 87 (irq_hw_number_t)i); 88 88 } 89 89 ··· 278 278 int i; 279 279 280 280 /* Setup an irq_domain structure */ 281 - socrates_fpga_pic_irq_host = irq_domain_add_linear(pic, 281 + socrates_fpga_pic_irq_host = irq_domain_create_linear(of_fwnode_handle(pic), 282 282 SOCRATES_FPGA_NUM_IRQS, &socrates_fpga_pic_host_ops, NULL); 283 283 if (socrates_fpga_pic_irq_host == NULL) { 284 284 pr_err("FPGA PIC: Unable to allocate host\n");
+3 -2
arch/powerpc/platforms/8xx/cpm1-ic.c
··· 59 59 cpm_vec = in_be16(&data->reg->cpic_civr); 60 60 cpm_vec >>= 11; 61 61 62 - return irq_linear_revmap(data->host, cpm_vec); 62 + return irq_find_mapping(data->host, cpm_vec); 63 63 } 64 64 65 65 static void cpm_cascade(struct irq_desc *desc) ··· 110 110 111 111 out_be32(&data->reg->cpic_cimr, 0); 112 112 113 - data->host = irq_domain_add_linear(dev->of_node, 64, &cpm_pic_host_ops, data); 113 + data->host = irq_domain_create_linear(of_fwnode_handle(dev->of_node), 114 + 64, &cpm_pic_host_ops, data); 114 115 if (!data->host) 115 116 return -ENODEV; 116 117
+3 -2
arch/powerpc/platforms/8xx/pic.c
··· 80 80 if (irq == PIC_VEC_SPURRIOUS) 81 81 return 0; 82 82 83 - return irq_linear_revmap(mpc8xx_pic_host, irq); 83 + return irq_find_mapping(mpc8xx_pic_host, irq); 84 84 85 85 } 86 86 ··· 146 146 if (!siu_reg) 147 147 goto out; 148 148 149 - mpc8xx_pic_host = irq_domain_add_linear(np, 64, &mpc8xx_pic_host_ops, NULL); 149 + mpc8xx_pic_host = irq_domain_create_linear(of_fwnode_handle(np), 64, 150 + &mpc8xx_pic_host_ops, NULL); 150 151 if (!mpc8xx_pic_host) 151 152 printk(KERN_ERR "MPC8xx PIC: failed to allocate irq host!\n"); 152 153
+4 -3
arch/powerpc/platforms/embedded6xx/flipper-pic.c
··· 149 149 150 150 __flipper_quiesce(io_base); 151 151 152 - irq_domain = irq_domain_add_linear(np, FLIPPER_NR_IRQS, 153 - &flipper_irq_domain_ops, io_base); 152 + irq_domain = irq_domain_create_linear(of_fwnode_handle(np), 153 + FLIPPER_NR_IRQS, 154 + &flipper_irq_domain_ops, io_base); 154 155 if (!irq_domain) { 155 156 pr_err("failed to allocate irq_domain\n"); 156 157 return NULL; ··· 173 172 return 0; /* no more IRQs pending */ 174 173 175 174 irq = __ffs(irq_status); 176 - return irq_linear_revmap(flipper_irq_host, irq); 175 + return irq_find_mapping(flipper_irq_host, irq); 177 176 } 178 177 179 178 /*
+4 -3
arch/powerpc/platforms/embedded6xx/hlwd-pic.c
··· 175 175 176 176 __hlwd_quiesce(io_base); 177 177 178 - irq_domain = irq_domain_add_linear(np, HLWD_NR_IRQS, 179 - &hlwd_irq_domain_ops, io_base); 178 + irq_domain = irq_domain_create_linear(of_fwnode_handle(np), 179 + HLWD_NR_IRQS, 180 + &hlwd_irq_domain_ops, io_base); 180 181 if (!irq_domain) { 181 182 pr_err("failed to allocate irq_domain\n"); 182 183 iounmap(io_base); ··· 190 189 unsigned int hlwd_pic_get_irq(void) 191 190 { 192 191 unsigned int hwirq = __hlwd_pic_get_irq(hlwd_irq_host); 193 - return hwirq ? irq_linear_revmap(hlwd_irq_host, hwirq) : 0; 192 + return hwirq ? irq_find_mapping(hlwd_irq_host, hwirq) : 0; 194 193 } 195 194 196 195 /*
+4 -3
arch/powerpc/platforms/powermac/pic.c
··· 250 250 raw_spin_unlock_irqrestore(&pmac_pic_lock, flags); 251 251 if (unlikely(irq < 0)) 252 252 return 0; 253 - return irq_linear_revmap(pmac_pic_host, irq); 253 + return irq_find_mapping(pmac_pic_host, irq); 254 254 } 255 255 256 256 static int pmac_pic_host_match(struct irq_domain *h, struct device_node *node, ··· 327 327 /* 328 328 * Allocate an irq host 329 329 */ 330 - pmac_pic_host = irq_domain_add_linear(master, max_irqs, 331 - &pmac_pic_host_ops, NULL); 330 + pmac_pic_host = irq_domain_create_linear(of_fwnode_handle(master), 331 + max_irqs, 332 + &pmac_pic_host_ops, NULL); 332 333 BUG_ON(pmac_pic_host == NULL); 333 334 irq_set_default_domain(pmac_pic_host); 334 335
+1 -1
arch/powerpc/platforms/powermac/smp.c
··· 190 190 { 191 191 int rc = -ENOMEM; 192 192 193 - psurge_host = irq_domain_add_nomap(NULL, ~0, &psurge_host_ops, NULL); 193 + psurge_host = irq_domain_create_nomap(NULL, ~0, &psurge_host_ops, NULL); 194 194 195 195 if (psurge_host) 196 196 psurge_secondary_virq = irq_create_direct_mapping(psurge_host);
+2 -1
arch/powerpc/platforms/powernv/opal-irqchip.c
··· 191 191 * fall back to the legacy method (opal_event_request(...)) 192 192 * anyway. */ 193 193 dn = of_find_compatible_node(NULL, NULL, "ibm,opal-event"); 194 - opal_event_irqchip.domain = irq_domain_add_linear(dn, MAX_NUM_EVENTS, 194 + opal_event_irqchip.domain = irq_domain_create_linear(of_fwnode_handle(dn), 195 + MAX_NUM_EVENTS, 195 196 &opal_event_domain_ops, &opal_event_irqchip); 196 197 of_node_put(dn); 197 198 if (!opal_event_irqchip.domain) {
+1 -1
arch/powerpc/platforms/powernv/pci-ioda.c
··· 1897 1897 return -ENOMEM; 1898 1898 } 1899 1899 1900 - hose->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(hose->dn), 1900 + hose->msi_domain = pci_msi_create_irq_domain(of_fwnode_handle(hose->dn), 1901 1901 &pnv_msi_domain_info, 1902 1902 hose->dev_domain); 1903 1903 if (!hose->msi_domain) {
+1 -1
arch/powerpc/platforms/ps3/interrupt.c
··· 743 743 unsigned cpu; 744 744 struct irq_domain *host; 745 745 746 - host = irq_domain_add_nomap(NULL, PS3_PLUG_MAX + 1, &ps3_host_ops, NULL); 746 + host = irq_domain_create_nomap(NULL, PS3_PLUG_MAX + 1, &ps3_host_ops, NULL); 747 747 irq_set_default_domain(host); 748 748 749 749 for_each_possible_cpu(cpu) {
+1 -1
arch/powerpc/platforms/pseries/msi.c
··· 633 633 return -ENOMEM; 634 634 } 635 635 636 - phb->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(phb->dn), 636 + phb->msi_domain = pci_msi_create_irq_domain(of_fwnode_handle(phb->dn), 637 637 &pseries_msi_domain_info, 638 638 phb->dev_domain); 639 639 if (!phb->msi_domain) {
+3 -2
arch/powerpc/sysdev/cpm2_pic.c
··· 207 207 208 208 if (irq == 0) 209 209 return(-1); 210 - return irq_linear_revmap(cpm2_pic_host, irq); 210 + return irq_find_mapping(cpm2_pic_host, irq); 211 211 } 212 212 213 213 static int cpm2_pic_host_map(struct irq_domain *h, unsigned int virq, ··· 259 259 out_be32(&cpm2_intctl->ic_scprrl, 0x05309770); 260 260 261 261 /* create a legacy host */ 262 - cpm2_pic_host = irq_domain_add_linear(node, 64, &cpm2_pic_host_ops, NULL); 262 + cpm2_pic_host = irq_domain_create_linear(of_fwnode_handle(node), 64, 263 + &cpm2_pic_host_ops, NULL); 263 264 if (cpm2_pic_host == NULL) { 264 265 printk(KERN_ERR "CPM2 PIC: failed to allocate irq host!\n"); 265 266 return;
+4 -3
arch/powerpc/sysdev/ehv_pic.c
··· 175 175 * this will also setup revmap[] in the slow path for the first 176 176 * time, next calls will always use fast path by indexing revmap 177 177 */ 178 - return irq_linear_revmap(global_ehv_pic->irqhost, irq); 178 + return irq_find_mapping(global_ehv_pic->irqhost, irq); 179 179 } 180 180 181 181 static int ehv_pic_host_match(struct irq_domain *h, struct device_node *node, ··· 269 269 return; 270 270 } 271 271 272 - ehv_pic->irqhost = irq_domain_add_linear(np, NR_EHV_PIC_INTS, 273 - &ehv_pic_host_ops, ehv_pic); 272 + ehv_pic->irqhost = irq_domain_create_linear(of_fwnode_handle(np), 273 + NR_EHV_PIC_INTS, 274 + &ehv_pic_host_ops, ehv_pic); 274 275 if (!ehv_pic->irqhost) { 275 276 of_node_put(np); 276 277 kfree(ehv_pic);
+1 -1
arch/powerpc/sysdev/fsl_msi.c
··· 412 412 } 413 413 platform_set_drvdata(dev, msi); 414 414 415 - msi->irqhost = irq_domain_add_linear(dev->dev.of_node, 415 + msi->irqhost = irq_domain_create_linear(of_fwnode_handle(dev->dev.of_node), 416 416 NR_MSI_IRQS_MAX, &fsl_msi_host_ops, msi); 417 417 418 418 if (msi->irqhost == NULL) {
+4 -3
arch/powerpc/sysdev/ge/ge_pic.c
··· 214 214 } 215 215 216 216 /* Setup an irq_domain structure */ 217 - gef_pic_irq_host = irq_domain_add_linear(np, GEF_PIC_NUM_IRQS, 218 - &gef_pic_host_ops, NULL); 217 + gef_pic_irq_host = irq_domain_create_linear(of_fwnode_handle(np), 218 + GEF_PIC_NUM_IRQS, 219 + &gef_pic_host_ops, NULL); 219 220 if (gef_pic_irq_host == NULL) 220 221 return; 221 222 ··· 245 244 if (active & (0x1 << hwirq)) 246 245 break; 247 246 } 248 - virq = irq_linear_revmap(gef_pic_irq_host, 247 + virq = irq_find_mapping(gef_pic_irq_host, 249 248 (irq_hw_number_t)hwirq); 250 249 } 251 250
+2 -2
arch/powerpc/sysdev/i8259.c
··· 260 260 raw_spin_unlock_irqrestore(&i8259_lock, flags); 261 261 262 262 /* create a legacy host */ 263 - i8259_host = irq_domain_add_legacy(node, NR_IRQS_LEGACY, 0, 0, 264 - &i8259_host_ops, NULL); 263 + i8259_host = irq_domain_create_legacy(of_fwnode_handle(node), NR_IRQS_LEGACY, 0, 0, 264 + &i8259_host_ops, NULL); 265 265 if (i8259_host == NULL) { 266 266 printk(KERN_ERR "i8259: failed to allocate irq host !\n"); 267 267 return;
+4 -3
arch/powerpc/sysdev/ipic.c
··· 711 711 if (ipic == NULL) 712 712 return NULL; 713 713 714 - ipic->irqhost = irq_domain_add_linear(node, NR_IPIC_INTS, 715 - &ipic_host_ops, ipic); 714 + ipic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), 715 + NR_IPIC_INTS, 716 + &ipic_host_ops, ipic); 716 717 if (ipic->irqhost == NULL) { 717 718 kfree(ipic); 718 719 return NULL; ··· 801 800 if (irq == 0) /* 0 --> no irq is pending */ 802 801 return 0; 803 802 804 - return irq_linear_revmap(primary_ipic->irqhost, irq); 803 + return irq_find_mapping(primary_ipic->irqhost, irq); 805 804 } 806 805 807 806 #ifdef CONFIG_SUSPEND
+5 -5
arch/powerpc/sysdev/mpic.c
··· 1484 1484 mpic->isu_shift = 1 + __ilog2(mpic->isu_size - 1); 1485 1485 mpic->isu_mask = (1 << mpic->isu_shift) - 1; 1486 1486 1487 - mpic->irqhost = irq_domain_add_linear(mpic->node, 1488 - intvec_top, 1489 - &mpic_host_ops, mpic); 1487 + mpic->irqhost = irq_domain_create_linear(of_fwnode_handle(mpic->node), 1488 + intvec_top, 1489 + &mpic_host_ops, mpic); 1490 1490 1491 1491 /* 1492 1492 * FIXME: The code leaks the MPIC object and mappings here; this ··· 1786 1786 return 0; 1787 1787 } 1788 1788 1789 - return irq_linear_revmap(mpic->irqhost, src); 1789 + return irq_find_mapping(mpic->irqhost, src); 1790 1790 } 1791 1791 1792 1792 unsigned int mpic_get_one_irq(struct mpic *mpic) ··· 1824 1824 return 0; 1825 1825 } 1826 1826 1827 - return irq_linear_revmap(mpic->irqhost, src); 1827 + return irq_find_mapping(mpic->irqhost, src); 1828 1828 #else 1829 1829 return 0; 1830 1830 #endif
+2 -2
arch/powerpc/sysdev/tsi108_pci.c
··· 404 404 { 405 405 DBG("Tsi108_pci_int_init: initializing PCI interrupts\n"); 406 406 407 - pci_irq_host = irq_domain_add_legacy(node, NR_IRQS_LEGACY, 0, 0, 408 - &pci_irq_domain_ops, NULL); 407 + pci_irq_host = irq_domain_create_legacy(of_fwnode_handle(node), NR_IRQS_LEGACY, 0, 0, 408 + &pci_irq_domain_ops, NULL); 409 409 if (pci_irq_host == NULL) { 410 410 printk(KERN_ERR "pci_irq_host: failed to allocate irq domain!\n"); 411 411 return;
+1 -1
arch/powerpc/sysdev/xive/common.c
··· 1464 1464 1465 1465 static void __init xive_init_host(struct device_node *np) 1466 1466 { 1467 - xive_irq_domain = irq_domain_add_tree(np, &xive_irq_domain_ops, NULL); 1467 + xive_irq_domain = irq_domain_create_tree(of_fwnode_handle(np), &xive_irq_domain_ops, NULL); 1468 1468 if (WARN_ON(xive_irq_domain == NULL)) 1469 1469 return; 1470 1470 irq_set_default_domain(xive_irq_domain);
+4 -3
arch/sh/boards/mach-se/7343/irq.c
··· 47 47 { 48 48 int i; 49 49 50 - se7343_irq_domain = irq_domain_add_linear(NULL, SE7343_FPGA_IRQ_NR, 51 - &irq_domain_simple_ops, NULL); 50 + se7343_irq_domain = irq_domain_create_linear(NULL, SE7343_FPGA_IRQ_NR, 51 + &irq_domain_simple_ops, 52 + NULL); 52 53 if (unlikely(!se7343_irq_domain)) { 53 54 printk("Failed to get IRQ domain\n"); 54 55 return; ··· 71 70 struct irq_chip_type *ct; 72 71 unsigned int irq_base; 73 72 74 - irq_base = irq_linear_revmap(se7343_irq_domain, 0); 73 + irq_base = irq_find_mapping(se7343_irq_domain, 0); 75 74 76 75 gc = irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7343_irq_regs, 77 76 handle_level_irq);
+2 -2
arch/sh/boards/mach-se/7722/irq.c
··· 46 46 { 47 47 int i; 48 48 49 - se7722_irq_domain = irq_domain_add_linear(NULL, SE7722_FPGA_IRQ_NR, 49 + se7722_irq_domain = irq_domain_create_linear(NULL, SE7722_FPGA_IRQ_NR, 50 50 &irq_domain_simple_ops, NULL); 51 51 if (unlikely(!se7722_irq_domain)) { 52 52 printk("Failed to get IRQ domain\n"); ··· 69 69 struct irq_chip_type *ct; 70 70 unsigned int irq_base; 71 71 72 - irq_base = irq_linear_revmap(se7722_irq_domain, 0); 72 + irq_base = irq_find_mapping(se7722_irq_domain, 0); 73 73 74 74 gc = irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7722_irq_regs, 75 75 handle_level_irq);
+1 -1
arch/sh/boards/mach-x3proto/gpio.c
··· 108 108 if (unlikely(ret)) 109 109 goto err_gpio; 110 110 111 - x3proto_irq_domain = irq_domain_add_linear(NULL, NR_BASEBOARD_GPIOS, 111 + x3proto_irq_domain = irq_domain_create_linear(NULL, NR_BASEBOARD_GPIOS, 112 112 &x3proto_gpio_irq_ops, NULL); 113 113 if (unlikely(!x3proto_irq_domain)) 114 114 goto err_irq;
+1 -1
arch/x86/kernel/apic/io_apic.c
··· 2225 2225 2226 2226 /* Handle device tree enumerated APICs proper */ 2227 2227 if (cfg->dev) { 2228 - fn = of_node_to_fwnode(cfg->dev); 2228 + fn = of_fwnode_handle(cfg->dev); 2229 2229 } else { 2230 2230 fn = irq_domain_alloc_named_id_fwnode("IO-APIC", mpc_ioapic_id(ioapic)); 2231 2231 if (!fn)
+3 -3
drivers/bus/moxtet.c
··· 737 737 { 738 738 int i, ret; 739 739 740 - moxtet->irq.domain = irq_domain_add_simple(moxtet->dev->of_node, 741 - MOXTET_NIRQS, 0, 742 - &moxtet_irq_domain, moxtet); 740 + moxtet->irq.domain = irq_domain_create_simple(of_fwnode_handle(moxtet->dev->of_node), 741 + MOXTET_NIRQS, 0, 742 + &moxtet_irq_domain, moxtet); 743 743 if (moxtet->irq.domain == NULL) { 744 744 dev_err(moxtet->dev, "Could not add IRQ domain\n"); 745 745 return -ENOMEM;
+2 -2
drivers/edac/altera_edac.c
··· 2131 2131 edac->irq_chip.name = pdev->dev.of_node->name; 2132 2132 edac->irq_chip.irq_mask = a10_eccmgr_irq_mask; 2133 2133 edac->irq_chip.irq_unmask = a10_eccmgr_irq_unmask; 2134 - edac->domain = irq_domain_add_linear(pdev->dev.of_node, 64, 2135 - &a10_eccmgr_ic_ops, edac); 2134 + edac->domain = irq_domain_create_linear(of_fwnode_handle(pdev->dev.of_node), 2135 + 64, &a10_eccmgr_ic_ops, edac); 2136 2136 if (!edac->domain) { 2137 2137 dev_err(&pdev->dev, "Error adding IRQ domain\n"); 2138 2138 return -ENOMEM;
+1 -1
drivers/gpio/gpio-brcmstb.c
··· 437 437 int err; 438 438 439 439 priv->irq_domain = 440 - irq_domain_add_linear(np, priv->num_gpios, 440 + irq_domain_create_linear(of_fwnode_handle(np), priv->num_gpios, 441 441 &brcmstb_gpio_irq_domain_ops, 442 442 priv); 443 443 if (!priv->irq_domain) {
+2 -3
drivers/gpio/gpio-davinci.c
··· 479 479 return irq; 480 480 } 481 481 482 - irq_domain = irq_domain_add_legacy(dev->of_node, ngpio, irq, 0, 483 - &davinci_gpio_irq_ops, 484 - chips); 482 + irq_domain = irq_domain_create_legacy(of_fwnode_handle(dev->of_node), ngpio, irq, 0, 483 + &davinci_gpio_irq_ops, chips); 485 484 if (!irq_domain) { 486 485 dev_err(dev, "Couldn't register an IRQ domain\n"); 487 486 return -ENODEV;
+3 -2
drivers/gpio/gpio-em.c
··· 323 323 irq_chip->irq_release_resources = em_gio_irq_relres; 324 324 irq_chip->flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND; 325 325 326 - p->irq_domain = irq_domain_add_simple(dev->of_node, ngpios, 0, 327 - &em_gio_irq_domain_ops, p); 326 + p->irq_domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node), 327 + ngpios, 0, 328 + &em_gio_irq_domain_ops, p); 328 329 if (!p->irq_domain) { 329 330 dev_err(dev, "cannot initialize irq domain\n"); 330 331 return -ENXIO;
+1 -1
drivers/gpio/gpio-grgpio.c
··· 397 397 return -EINVAL; 398 398 } 399 399 400 - priv->domain = irq_domain_add_linear(np, gc->ngpio, 400 + priv->domain = irq_domain_create_linear(of_fwnode_handle(np), gc->ngpio, 401 401 &grgpio_irq_domain_ops, 402 402 priv); 403 403 if (!priv->domain) {
+1 -1
drivers/gpio/gpio-idt3243x.c
··· 37 37 pending = readl(ctrl->pic + IDT_PIC_IRQ_PEND); 38 38 pending &= ~ctrl->mask_cache; 39 39 for_each_set_bit(bit, &pending, gc->ngpio) { 40 - virq = irq_linear_revmap(gc->irq.domain, bit); 40 + virq = irq_find_mapping(gc->irq.domain, bit); 41 41 if (virq) 42 42 generic_handle_irq(virq); 43 43 }
+3 -5
drivers/gpio/gpio-lpc18xx.c
··· 240 240 241 241 raw_spin_lock_init(&ic->lock); 242 242 243 - ic->domain = irq_domain_add_hierarchy(parent_domain, 0, 244 - NR_LPC18XX_GPIO_PIN_IC_IRQS, 245 - dev->of_node, 246 - &lpc18xx_gpio_pin_ic_domain_ops, 247 - ic); 243 + ic->domain = irq_domain_create_hierarchy(parent_domain, 0, NR_LPC18XX_GPIO_PIN_IC_IRQS, 244 + of_fwnode_handle(dev->of_node), 245 + &lpc18xx_gpio_pin_ic_domain_ops, ic); 248 246 if (!ic->domain) { 249 247 pr_err("unable to add irq domain\n"); 250 248 ret = -ENODEV;
+1 -1
drivers/gpio/gpio-mvebu.c
··· 1237 1237 return 0; 1238 1238 1239 1239 mvchip->domain = 1240 - irq_domain_add_linear(np, ngpios, &irq_generic_chip_ops, NULL); 1240 + irq_domain_create_linear(of_fwnode_handle(np), ngpios, &irq_generic_chip_ops, NULL); 1241 1241 if (!mvchip->domain) { 1242 1242 dev_err(&pdev->dev, "couldn't allocate irq domain %s (DT).\n", 1243 1243 mvchip->chip.label);
+1 -1
drivers/gpio/gpio-mxc.c
··· 502 502 goto out_bgio; 503 503 } 504 504 505 - port->domain = irq_domain_add_legacy(np, 32, irq_base, 0, 505 + port->domain = irq_domain_create_legacy(of_fwnode_handle(np), 32, irq_base, 0, 506 506 &irq_domain_simple_ops, NULL); 507 507 if (!port->domain) { 508 508 err = -ENODEV;
+2 -2
drivers/gpio/gpio-mxs.c
··· 303 303 goto out_iounmap; 304 304 } 305 305 306 - port->domain = irq_domain_add_legacy(np, 32, irq_base, 0, 307 - &irq_domain_simple_ops, NULL); 306 + port->domain = irq_domain_create_legacy(of_fwnode_handle(np), 32, irq_base, 0, 307 + &irq_domain_simple_ops, NULL); 308 308 if (!port->domain) { 309 309 err = -ENODEV; 310 310 goto out_iounmap;
+3 -3
drivers/gpio/gpio-pxa.c
··· 636 636 if (!pxa_last_gpio) 637 637 return -EINVAL; 638 638 639 - pchip->irqdomain = irq_domain_add_legacy(pdev->dev.of_node, 640 - pxa_last_gpio + 1, irq_base, 641 - 0, &pxa_irq_domain_ops, pchip); 639 + pchip->irqdomain = irq_domain_create_legacy(of_fwnode_handle(pdev->dev.of_node), 640 + pxa_last_gpio + 1, irq_base, 0, 641 + &pxa_irq_domain_ops, pchip); 642 642 if (!pchip->irqdomain) 643 643 return -ENOMEM; 644 644
+1 -1
drivers/gpio/gpio-rockchip.c
··· 521 521 struct irq_chip_generic *gc; 522 522 int ret; 523 523 524 - bank->domain = irq_domain_add_linear(bank->of_node, 32, 524 + bank->domain = irq_domain_create_linear(of_fwnode_handle(bank->of_node), 32, 525 525 &irq_generic_chip_ops, NULL); 526 526 if (!bank->domain) { 527 527 dev_warn(bank->dev, "could not init irq domain for bank %s\n",
+1 -1
drivers/gpio/gpio-sa1100.c
··· 319 319 320 320 gpiochip_add_data(&sa1100_gpio_chip.chip, NULL); 321 321 322 - sa1100_gpio_irqdomain = irq_domain_add_simple(NULL, 322 + sa1100_gpio_irqdomain = irq_domain_create_simple(NULL, 323 323 28, IRQ_GPIO0, 324 324 &sa1100_gpio_irqdomain_ops, sgc); 325 325
+1 -1
drivers/gpio/gpio-sodaville.c
··· 169 169 IRQ_GC_INIT_MASK_CACHE, IRQ_NOREQUEST, 170 170 IRQ_LEVEL | IRQ_NOPROBE); 171 171 172 - sd->id = irq_domain_add_legacy(pdev->dev.of_node, SDV_NUM_PUB_GPIOS, 172 + sd->id = irq_domain_create_legacy(of_fwnode_handle(pdev->dev.of_node), SDV_NUM_PUB_GPIOS, 173 173 sd->irq_base, 0, &irq_domain_sdv_ops, sd); 174 174 if (!sd->id) 175 175 return -ENODEV;
+1 -1
drivers/gpio/gpio-tb10x.c
··· 183 183 if (ret != 0) 184 184 return ret; 185 185 186 - tb10x_gpio->domain = irq_domain_add_linear(np, 186 + tb10x_gpio->domain = irq_domain_create_linear(of_fwnode_handle(np), 187 187 tb10x_gpio->gc.ngpio, 188 188 &irq_generic_chip_ops, NULL); 189 189 if (!tb10x_gpio->domain) {
+2 -3
drivers/gpio/gpio-twl4030.c
··· 502 502 static int gpio_twl4030_probe(struct platform_device *pdev) 503 503 { 504 504 struct twl4030_gpio_platform_data *pdata; 505 - struct device_node *node = pdev->dev.of_node; 506 505 struct gpio_twl4030_priv *priv; 507 506 int ret, irq_base; 508 507 ··· 523 524 return irq_base; 524 525 } 525 526 526 - irq_domain_add_legacy(node, TWL4030_GPIO_MAX, irq_base, 0, 527 - &irq_domain_simple_ops, NULL); 527 + irq_domain_create_legacy(of_fwnode_handle(pdev->dev.of_node), TWL4030_GPIO_MAX, irq_base, 0, 528 + &irq_domain_simple_ops, NULL); 528 529 529 530 ret = twl4030_sih_setup(&pdev->dev, TWL4030_MODULE_GPIO, irq_base); 530 531 if (ret < 0)
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
··· 725 725 */ 726 726 int amdgpu_irq_add_domain(struct amdgpu_device *adev) 727 727 { 728 - adev->irq.domain = irq_domain_add_linear(NULL, AMDGPU_MAX_IRQ_SRC_ID, 729 - &amdgpu_hw_irqdomain_ops, adev); 728 + adev->irq.domain = irq_domain_create_linear(NULL, AMDGPU_MAX_IRQ_SRC_ID, 729 + &amdgpu_hw_irqdomain_ops, adev); 730 730 if (!adev->irq.domain) { 731 731 DRM_ERROR("GPU irq add domain failed\n"); 732 732 return -ENODEV;
+1 -1
drivers/gpu/drm/msm/msm_mdss.c
··· 150 150 151 151 dev = msm_mdss->dev; 152 152 153 - domain = irq_domain_add_linear(dev->of_node, 32, 153 + domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), 32, 154 154 &msm_mdss_irqdomain_ops, msm_mdss); 155 155 if (!domain) { 156 156 dev_err(dev, "failed to add irq_domain\n");
+4 -4
drivers/gpu/ipu-v3/ipu-common.c
··· 1008 1008 { 1009 1009 int virq; 1010 1010 1011 - virq = irq_linear_revmap(ipu->domain, irq); 1011 + virq = irq_find_mapping(ipu->domain, irq); 1012 1012 if (!virq) 1013 1013 virq = irq_create_mapping(ipu->domain, irq); 1014 1014 ··· 1169 1169 }; 1170 1170 int ret, i; 1171 1171 1172 - ipu->domain = irq_domain_add_linear(ipu->dev->of_node, IPU_NUM_IRQS, 1173 - &irq_generic_chip_ops, ipu); 1172 + ipu->domain = irq_domain_create_linear(of_fwnode_handle(ipu->dev->of_node), IPU_NUM_IRQS, 1173 + &irq_generic_chip_ops, ipu); 1174 1174 if (!ipu->domain) { 1175 1175 dev_err(ipu->dev, "failed to add irq domain\n"); 1176 1176 return -ENODEV; ··· 1219 1219 /* TODO: remove irq_domain_generic_chips */ 1220 1220 1221 1221 for (i = 0; i < IPU_NUM_IRQS; i++) { 1222 - irq = irq_linear_revmap(ipu->domain, i); 1222 + irq = irq_find_mapping(ipu->domain, i); 1223 1223 if (irq) 1224 1224 irq_dispose_mapping(irq); 1225 1225 }
+1 -1
drivers/i2c/busses/i2c-cht-wc.c
··· 467 467 return ret; 468 468 469 469 /* Alloc and register client IRQ */ 470 - adap->irq_domain = irq_domain_add_linear(NULL, 1, &irq_domain_simple_ops, NULL); 470 + adap->irq_domain = irq_domain_create_linear(NULL, 1, &irq_domain_simple_ops, NULL); 471 471 if (!adap->irq_domain) 472 472 return -ENOMEM; 473 473
+3 -3
drivers/i2c/muxes/i2c-mux-pca954x.c
··· 442 442 443 443 raw_spin_lock_init(&data->lock); 444 444 445 - data->irq = irq_domain_add_linear(client->dev.of_node, 446 - data->chip->nchans, 447 - &irq_domain_simple_ops, data); 445 + data->irq = irq_domain_create_linear(of_fwnode_handle(client->dev.of_node), 446 + data->chip->nchans, 447 + &irq_domain_simple_ops, data); 448 448 if (!data->irq) 449 449 return -ENODEV; 450 450
+4 -3
drivers/iio/adc/stm32-adc-core.c
··· 421 421 return priv->irq[i]; 422 422 } 423 423 424 - priv->domain = irq_domain_add_simple(np, STM32_ADC_MAX_ADCS, 0, 425 - &stm32_adc_domain_ops, 426 - priv); 424 + priv->domain = irq_domain_create_simple(of_fwnode_handle(np), 425 + STM32_ADC_MAX_ADCS, 0, 426 + &stm32_adc_domain_ops, 427 + priv); 427 428 if (!priv->domain) { 428 429 dev_err(&pdev->dev, "Failed to add irq domain\n"); 429 430 return -ENOMEM;
+1 -1
drivers/irqchip/exynos-combiner.c
··· 180 180 if (!combiner_data) 181 181 return; 182 182 183 - combiner_irq_domain = irq_domain_add_linear(np, nr_irq, 183 + combiner_irq_domain = irq_domain_create_linear(of_fwnode_handle(np), nr_irq, 184 184 &combiner_irq_domain_ops, combiner_data); 185 185 if (WARN_ON(!combiner_irq_domain)) { 186 186 pr_warn("%s: irq domain init failed\n", __func__);
+1 -1
drivers/irqchip/irq-al-fic.c
··· 131 131 struct irq_chip_generic *gc; 132 132 int ret; 133 133 134 - fic->domain = irq_domain_add_linear(node, 134 + fic->domain = irq_domain_create_linear(of_fwnode_handle(node), 135 135 NR_FIC_IRQS, 136 136 &irq_generic_chip_ops, 137 137 fic);
+3 -4
drivers/irqchip/irq-alpine-msi.c
··· 205 205 return -ENXIO; 206 206 } 207 207 208 - middle_domain = irq_domain_add_hierarchy(gic_domain, 0, 0, NULL, 209 - &alpine_msix_middle_domain_ops, 210 - priv); 208 + middle_domain = irq_domain_create_hierarchy(gic_domain, 0, 0, NULL, 209 + &alpine_msix_middle_domain_ops, priv); 211 210 if (!middle_domain) { 212 211 pr_err("Failed to create the MSIX middle domain\n"); 213 212 return -ENOMEM; 214 213 } 215 214 216 - msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(node), 215 + msi_domain = pci_msi_create_irq_domain(of_fwnode_handle(node), 217 216 &alpine_msix_domain_info, 218 217 middle_domain); 219 218 if (!msi_domain) {
+2 -2
drivers/irqchip/irq-apple-aic.c
··· 1014 1014 1015 1015 irqc->info.die_stride = off - start_off; 1016 1016 1017 - irqc->hw_domain = irq_domain_create_tree(of_node_to_fwnode(node), 1017 + irqc->hw_domain = irq_domain_create_tree(of_fwnode_handle(node), 1018 1018 &aic_irq_domain_ops, irqc); 1019 1019 if (WARN_ON(!irqc->hw_domain)) 1020 1020 goto err_unmap; ··· 1067 1067 1068 1068 if (is_kernel_in_hyp_mode()) { 1069 1069 struct irq_fwspec mi = { 1070 - .fwnode = of_node_to_fwnode(node), 1070 + .fwnode = of_fwnode_handle(node), 1071 1071 .param_count = 3, 1072 1072 .param = { 1073 1073 [0] = AIC_FIQ, /* This is a lie */
+6 -6
drivers/irqchip/irq-armada-370-xp.c
··· 348 348 mpic->msi_doorbell_mask = PCI_MSI_FULL_DOORBELL_MASK; 349 349 } 350 350 351 - mpic->msi_inner_domain = irq_domain_add_linear(NULL, mpic->msi_doorbell_size, 351 + mpic->msi_inner_domain = irq_domain_create_linear(NULL, mpic->msi_doorbell_size, 352 352 &mpic_msi_domain_ops, mpic); 353 353 if (!mpic->msi_inner_domain) 354 354 return -ENOMEM; 355 355 356 - mpic->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(node), &mpic_msi_domain_info, 356 + mpic->msi_domain = pci_msi_create_irq_domain(of_fwnode_handle(node), &mpic_msi_domain_info, 357 357 mpic->msi_inner_domain); 358 358 if (!mpic->msi_domain) { 359 359 irq_domain_remove(mpic->msi_inner_domain); ··· 492 492 { 493 493 int base_ipi; 494 494 495 - mpic->ipi_domain = irq_domain_create_linear(of_node_to_fwnode(node), IPI_DOORBELL_NR, 495 + mpic->ipi_domain = irq_domain_create_linear(of_fwnode_handle(node), IPI_DOORBELL_NR, 496 496 &mpic_ipi_domain_ops, mpic); 497 497 if (WARN_ON(!mpic->ipi_domain)) 498 498 return -ENOMEM; ··· 546 546 { 547 547 /* Re-enable per-CPU interrupts that were enabled before suspend */ 548 548 for (irq_hw_number_t i = 0; i < MPIC_PER_CPU_IRQS_NR; i++) { 549 - unsigned int virq = irq_linear_revmap(mpic->domain, i); 549 + unsigned int virq = irq_find_mapping(mpic->domain, i); 550 550 struct irq_data *d; 551 551 552 552 if (!virq || !irq_percpu_is_enabled(virq)) ··· 740 740 741 741 /* Re-enable interrupts */ 742 742 for (irq_hw_number_t i = 0; i < mpic->domain->hwirq_max; i++) { 743 - unsigned int virq = irq_linear_revmap(mpic->domain, i); 743 + unsigned int virq = irq_find_mapping(mpic->domain, i); 744 744 struct irq_data *d; 745 745 746 746 if (!virq) ··· 861 861 if (!mpic_is_ipi_available(mpic)) 862 862 nr_irqs = MPIC_PER_CPU_IRQS_NR; 863 863 864 - mpic->domain = irq_domain_add_linear(node, nr_irqs, &mpic_irq_ops, mpic); 864 + mpic->domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irqs, &mpic_irq_ops, mpic); 865 865 if (!mpic->domain) { 866 866 pr_err("%pOF: Unable to add IRQ domain\n", node); 867 867 return -ENOMEM;
+1 -1
drivers/irqchip/irq-aspeed-i2c-ic.c
··· 82 82 goto err_iounmap; 83 83 } 84 84 85 - i2c_ic->irq_domain = irq_domain_add_linear(node, ASPEED_I2C_IC_NUM_BUS, 85 + i2c_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), ASPEED_I2C_IC_NUM_BUS, 86 86 &aspeed_i2c_ic_irq_domain_ops, 87 87 NULL); 88 88 if (!i2c_ic->irq_domain) {
+1 -1
drivers/irqchip/irq-aspeed-intc.c
··· 102 102 writel(0xffffffff, intc_ic->base + INTC_INT_STATUS_REG); 103 103 writel(0x0, intc_ic->base + INTC_INT_ENABLE_REG); 104 104 105 - intc_ic->irq_domain = irq_domain_add_linear(node, INTC_IRQS_PER_WORD, 105 + intc_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), INTC_IRQS_PER_WORD, 106 106 &aspeed_intc_ic_irq_domain_ops, intc_ic); 107 107 if (!intc_ic->irq_domain) { 108 108 ret = -ENOMEM;
+1 -1
drivers/irqchip/irq-aspeed-scu-ic.c
··· 165 165 goto err; 166 166 } 167 167 168 - scu_ic->irq_domain = irq_domain_add_linear(node, scu_ic->num_irqs, 168 + scu_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), scu_ic->num_irqs, 169 169 &aspeed_scu_ic_domain_ops, 170 170 scu_ic); 171 171 if (!scu_ic->irq_domain) {
+2 -2
drivers/irqchip/irq-aspeed-vic.c
··· 211 211 set_handle_irq(avic_handle_irq); 212 212 213 213 /* Register our domain */ 214 - vic->dom = irq_domain_add_simple(node, NUM_IRQS, 0, 215 - &avic_dom_ops, vic); 214 + vic->dom = irq_domain_create_simple(of_fwnode_handle(node), NUM_IRQS, 0, 215 + &avic_dom_ops, vic); 216 216 217 217 return 0; 218 218 }
+2 -2
drivers/irqchip/irq-ath79-misc.c
··· 147 147 return -ENOMEM; 148 148 } 149 149 150 - domain = irq_domain_add_linear(node, ATH79_MISC_IRQ_COUNT, 150 + domain = irq_domain_create_linear(of_fwnode_handle(node), ATH79_MISC_IRQ_COUNT, 151 151 &misc_irq_domain_ops, base); 152 152 if (!domain) { 153 153 pr_err("Failed to add MISC irqdomain\n"); ··· 188 188 else 189 189 ath79_misc_irq_chip.irq_ack = ar724x_misc_irq_ack; 190 190 191 - domain = irq_domain_add_legacy(NULL, ATH79_MISC_IRQ_COUNT, 191 + domain = irq_domain_create_legacy(NULL, ATH79_MISC_IRQ_COUNT, 192 192 irq_base, 0, &misc_irq_domain_ops, regs); 193 193 if (!domain) 194 194 panic("Failed to create MISC irqdomain");
+1 -1
drivers/irqchip/irq-atmel-aic-common.c
··· 228 228 goto err_iounmap; 229 229 } 230 230 231 - domain = irq_domain_add_linear(node, nchips * 32, ops, aic); 231 + domain = irq_domain_create_linear(of_fwnode_handle(node), nchips * 32, ops, aic); 232 232 if (!domain) { 233 233 ret = -ENOMEM; 234 234 goto err_free_aic;
+2 -2
drivers/irqchip/irq-bcm2712-mip.c
··· 174 174 { 175 175 struct irq_domain *middle; 176 176 177 - middle = irq_domain_add_hierarchy(mip->parent, 0, mip->num_msis, np, 178 - &mip_middle_domain_ops, mip); 177 + middle = irq_domain_create_hierarchy(mip->parent, 0, mip->num_msis, of_fwnode_handle(np), 178 + &mip_middle_domain_ops, mip); 179 179 if (!middle) 180 180 return -ENOMEM; 181 181
+1 -1
drivers/irqchip/irq-bcm2835.c
··· 144 144 if (!base) 145 145 panic("%pOF: unable to map IC registers\n", node); 146 146 147 - intc.domain = irq_domain_add_linear(node, MAKE_HWIRQ(NR_BANKS, 0), 147 + intc.domain = irq_domain_create_linear(of_fwnode_handle(node), MAKE_HWIRQ(NR_BANKS, 0), 148 148 &armctrl_ops, NULL); 149 149 if (!intc.domain) 150 150 panic("%pOF: unable to create IRQ domain\n", node);
+1 -1
drivers/irqchip/irq-bcm2836.c
··· 325 325 326 326 bcm2835_init_local_timer_frequency(); 327 327 328 - intc.domain = irq_domain_add_linear(node, LAST_IRQ + 1, 328 + intc.domain = irq_domain_create_linear(of_fwnode_handle(node), LAST_IRQ + 1, 329 329 &bcm2836_arm_irqchip_intc_ops, 330 330 NULL); 331 331 if (!intc.domain)
+1 -1
drivers/irqchip/irq-bcm6345-l1.c
··· 316 316 317 317 raw_spin_lock_init(&intc->lock); 318 318 319 - intc->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words, 319 + intc->domain = irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_WORD * intc->n_words, 320 320 &bcm6345_l1_domain_ops, 321 321 intc); 322 322 if (!intc->domain) {
+1 -1
drivers/irqchip/irq-bcm7038-l1.c
··· 416 416 } 417 417 } 418 418 419 - intc->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * intc->n_words, 419 + intc->domain = irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_WORD * intc->n_words, 420 420 &bcm7038_l1_domain_ops, 421 421 intc); 422 422 if (!intc->domain) {
+1 -1
drivers/irqchip/irq-bcm7120-l2.c
··· 260 260 goto out_free_l1_data; 261 261 } 262 262 263 - data->domain = irq_domain_add_linear(dn, IRQS_PER_WORD * data->n_words, 263 + data->domain = irq_domain_create_linear(of_fwnode_handle(dn), IRQS_PER_WORD * data->n_words, 264 264 &irq_generic_chip_ops, NULL); 265 265 if (!data->domain) { 266 266 ret = -ENOMEM;
+1 -1
drivers/irqchip/irq-brcmstb-l2.c
··· 178 178 goto out_unmap; 179 179 } 180 180 181 - data->domain = irq_domain_add_linear(np, 32, 181 + data->domain = irq_domain_create_linear(of_fwnode_handle(np), 32, 182 182 &irq_generic_chip_ops, NULL); 183 183 if (!data->domain) { 184 184 ret = -ENOMEM;
+2 -2
drivers/irqchip/irq-clps711x.c
··· 184 184 clps711x_intc->ops.map = clps711x_intc_irq_map; 185 185 clps711x_intc->ops.xlate = irq_domain_xlate_onecell; 186 186 clps711x_intc->domain = 187 - irq_domain_add_legacy(np, ARRAY_SIZE(clps711x_irqs), 188 - 0, 0, &clps711x_intc->ops, NULL); 187 + irq_domain_create_legacy(of_fwnode_handle(np), ARRAY_SIZE(clps711x_irqs), 0, 0, 188 + &clps711x_intc->ops, NULL); 189 189 if (!clps711x_intc->domain) { 190 190 err = -ENOMEM; 191 191 goto out_irqfree;
+2 -4
drivers/irqchip/irq-crossbar.c
··· 351 351 if (err) 352 352 return err; 353 353 354 - domain = irq_domain_add_hierarchy(parent_domain, 0, 355 - cb->max_crossbar_sources, 356 - node, &crossbar_domain_ops, 357 - NULL); 354 + domain = irq_domain_create_hierarchy(parent_domain, 0, cb->max_crossbar_sources, 355 + of_fwnode_handle(node), &crossbar_domain_ops, NULL); 358 356 if (!domain) { 359 357 pr_err("%pOF: failed to allocated domain\n", node); 360 358 return -ENOMEM;
+1 -1
drivers/irqchip/irq-csky-apb-intc.c
··· 113 113 return -EINVAL; 114 114 } 115 115 116 - root_domain = irq_domain_add_linear(node, nr_irq, 116 + root_domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irq, 117 117 &irq_generic_chip_ops, NULL); 118 118 if (!root_domain) { 119 119 pr_err("C-SKY Intc irq_domain_add failed.\n");
+1 -1
drivers/irqchip/irq-csky-mpintc.c
··· 255 255 writel_relaxed(BIT(0), INTCG_base + INTCG_ICTLR); 256 256 } 257 257 258 - root_domain = irq_domain_add_linear(node, nr_irq, &csky_irqdomain_ops, 258 + root_domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irq, &csky_irqdomain_ops, 259 259 NULL); 260 260 if (!root_domain) 261 261 return -ENXIO;
+4 -2
drivers/irqchip/irq-davinci-cp-intc.c
··· 204 204 return irq_base; 205 205 } 206 206 207 - davinci_cp_intc_irq_domain = irq_domain_add_legacy(node, num_irqs, irq_base, 0, 208 - &davinci_cp_intc_irq_domain_ops, NULL); 207 + davinci_cp_intc_irq_domain = irq_domain_create_legacy(of_fwnode_handle(node), num_irqs, 208 + irq_base, 0, 209 + &davinci_cp_intc_irq_domain_ops, 210 + NULL); 209 211 210 212 if (!davinci_cp_intc_irq_domain) { 211 213 pr_err("%s: unable to create an interrupt domain\n", __func__);
+1 -1
drivers/irqchip/irq-digicolor.c
··· 95 95 regmap_write(ucregs, UC_IRQ_CONTROL, 1); 96 96 97 97 digicolor_irq_domain = 98 - irq_domain_add_linear(node, 64, &irq_generic_chip_ops, NULL); 98 + irq_domain_create_linear(of_fwnode_handle(node), 64, &irq_generic_chip_ops, NULL); 99 99 if (!digicolor_irq_domain) { 100 100 pr_err("%pOF: unable to create IRQ domain\n", node); 101 101 return -ENOMEM;
+1 -1
drivers/irqchip/irq-dw-apb-ictl.c
··· 172 172 else 173 173 nrirqs = fls(readl_relaxed(iobase + APB_INT_ENABLE_L)); 174 174 175 - domain = irq_domain_add_linear(np, nrirqs, domain_ops, NULL); 175 + domain = irq_domain_create_linear(of_fwnode_handle(np), nrirqs, domain_ops, NULL); 176 176 if (!domain) { 177 177 pr_err("%pOF: unable to add irq domain\n", np); 178 178 ret = -ENOMEM;
+3 -2
drivers/irqchip/irq-ftintc010.c
··· 180 180 writel(0, FT010_IRQ_MASK(f->base)); 181 181 writel(0, FT010_FIQ_MASK(f->base)); 182 182 183 - f->domain = irq_domain_add_simple(node, FT010_NUM_IRQS, 0, 184 - &ft010_irqdomain_ops, f); 183 + f->domain = irq_domain_create_simple(of_fwnode_handle(node), 184 + FT010_NUM_IRQS, 0, 185 + &ft010_irqdomain_ops, f); 185 186 set_handle_irq(ft010_irqchip_handle_irq); 186 187 187 188 return 0;
+1 -1
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
··· 152 152 if (!of_property_read_bool(np, "msi-controller")) 153 153 continue; 154 154 155 - its_fsl_mc_msi_init_one(of_node_to_fwnode(np), 155 + its_fsl_mc_msi_init_one(of_fwnode_handle(np), 156 156 np->full_name); 157 157 } 158 158 }
+2 -2
drivers/irqchip/irq-gic-v3.c
··· 1826 1826 1827 1827 ppi_idx = __gic_get_ppi_index(ppi_intid); 1828 1828 ret = partition_translate_id(gic_data.ppi_descs[ppi_idx], 1829 - of_node_to_fwnode(np)); 1829 + of_fwnode_handle(np)); 1830 1830 if (ret < 0) 1831 1831 return ret; 1832 1832 ··· 2192 2192 2193 2193 part = &parts[part_idx]; 2194 2194 2195 - part->partition_id = of_node_to_fwnode(child_part); 2195 + part->partition_id = of_fwnode_handle(child_part); 2196 2196 2197 2197 pr_info("GIC: PPI partition %pOFn[%d] { ", 2198 2198 child_part, part_idx);
+3 -4
drivers/irqchip/irq-goldfish-pic.c
··· 101 101 irq_setup_generic_chip(gc, IRQ_MSK(GFPIC_NR_IRQS), 0, 102 102 IRQ_NOPROBE | IRQ_LEVEL, 0); 103 103 104 - gfpic->irq_domain = irq_domain_add_legacy(of_node, GFPIC_NR_IRQS, 105 - GFPIC_IRQ_BASE, 0, 106 - &goldfish_irq_domain_ops, 107 - NULL); 104 + gfpic->irq_domain = irq_domain_create_legacy(of_fwnode_handle(of_node), GFPIC_NR_IRQS, 105 + GFPIC_IRQ_BASE, 0, &goldfish_irq_domain_ops, 106 + NULL); 108 107 if (!gfpic->irq_domain) { 109 108 pr_err("Failed to add irqdomain!\n"); 110 109 ret = -ENOMEM;
+2 -4
drivers/irqchip/irq-hip04.c
··· 386 386 return -EINVAL; 387 387 } 388 388 389 - hip04_data.domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 390 - 0, 391 - &hip04_irq_domain_ops, 392 - &hip04_data); 389 + hip04_data.domain = irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, irq_base, 0, 390 + &hip04_irq_domain_ops, &hip04_data); 393 391 if (WARN_ON(!hip04_data.domain)) 394 392 return -EINVAL; 395 393
+2 -2
drivers/irqchip/irq-i8259.c
··· 313 313 314 314 init_8259A(0); 315 315 316 - domain = irq_domain_add_legacy(node, 16, I8259A_IRQ_BASE, 0, 317 - &i8259A_ops, NULL); 316 + domain = irq_domain_create_legacy(of_fwnode_handle(node), 16, I8259A_IRQ_BASE, 0, 317 + &i8259A_ops, NULL); 318 318 if (!domain) 319 319 panic("Failed to add i8259 IRQ domain"); 320 320
+1 -1
drivers/irqchip/irq-idt3243x.c
··· 72 72 goto out_unmap_irq; 73 73 } 74 74 75 - domain = irq_domain_add_linear(of_node, IDT_PIC_NR_IRQS, 75 + domain = irq_domain_create_linear(of_fwnode_handle(of_node), IDT_PIC_NR_IRQS, 76 76 &irq_generic_chip_ops, NULL); 77 77 if (!domain) { 78 78 pr_err("Failed to add irqdomain!\n");
+1 -1
drivers/irqchip/irq-imgpdc.c
··· 372 372 priv->syswake_irq = irq; 373 373 374 374 /* Set up an IRQ domain */ 375 - priv->domain = irq_domain_add_linear(node, 16, &irq_generic_chip_ops, 375 + priv->domain = irq_domain_create_linear(of_fwnode_handle(node), 16, &irq_generic_chip_ops, 376 376 priv); 377 377 if (unlikely(!priv->domain)) { 378 378 dev_err(&pdev->dev, "cannot add IRQ domain\n");
+2 -2
drivers/irqchip/irq-imx-gpcv2.c
··· 240 240 return -ENOMEM; 241 241 } 242 242 243 - domain = irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS, 244 - node, &gpcv2_irqchip_data_domain_ops, cd); 243 + domain = irq_domain_create_hierarchy(parent_domain, 0, GPC_MAX_IRQS, 244 + of_fwnode_handle(node), &gpcv2_irqchip_data_domain_ops, cd); 245 245 if (!domain) { 246 246 iounmap(cd->gpc_base); 247 247 kfree(cd);
+1 -1
drivers/irqchip/irq-imx-intmux.c
··· 254 254 goto out; 255 255 } 256 256 257 - domain = irq_domain_add_linear(np, 32, &imx_intmux_domain_ops, 257 + domain = irq_domain_create_linear(of_fwnode_handle(np), 32, &imx_intmux_domain_ops, 258 258 &data->irqchip_data[i]); 259 259 if (!domain) { 260 260 ret = -ENOMEM;
+1 -1
drivers/irqchip/irq-imx-irqsteer.c
··· 212 212 /* steer all IRQs into configured channel */ 213 213 writel_relaxed(BIT(data->channel), data->regs + CHANCTRL); 214 214 215 - data->domain = irq_domain_add_linear(np, data->reg_num * 32, 215 + data->domain = irq_domain_create_linear(of_fwnode_handle(np), data->reg_num * 32, 216 216 &imx_irqsteer_domain_ops, data); 217 217 if (!data->domain) { 218 218 dev_err(&pdev->dev, "failed to create IRQ domain\n");
+2 -2
drivers/irqchip/irq-ingenic-tcu.c
··· 111 111 112 112 tcu->nb_parent_irqs = irqs; 113 113 114 - tcu->domain = irq_domain_add_linear(np, 32, &irq_generic_chip_ops, 115 - NULL); 114 + tcu->domain = irq_domain_create_linear(of_fwnode_handle(np), 32, &irq_generic_chip_ops, 115 + NULL); 116 116 if (!tcu->domain) { 117 117 ret = -ENOMEM; 118 118 goto err_free_tcu;
+2 -2
drivers/irqchip/irq-ingenic.c
··· 90 90 goto out_unmap_irq; 91 91 } 92 92 93 - domain = irq_domain_add_linear(node, num_chips * 32, 94 - &irq_generic_chip_ops, NULL); 93 + domain = irq_domain_create_linear(of_fwnode_handle(node), num_chips * 32, 94 + &irq_generic_chip_ops, NULL); 95 95 if (!domain) { 96 96 err = -ENOMEM; 97 97 goto out_unmap_base;
+1 -1
drivers/irqchip/irq-ixp4xx.c
··· 261 261 pr_crit("IXP4XX: could not ioremap interrupt controller\n"); 262 262 return -ENODEV; 263 263 } 264 - fwnode = of_node_to_fwnode(np); 264 + fwnode = of_fwnode_handle(np); 265 265 266 266 /* These chip variants have 64 interrupts */ 267 267 is_356 = of_device_is_compatible(np, "intel,ixp43x-interrupt") ||
+2 -3
drivers/irqchip/irq-jcore-aic.c
··· 107 107 if (ret < 0) 108 108 return ret; 109 109 110 - domain = irq_domain_add_legacy(node, dom_sz - min_irq, min_irq, min_irq, 111 - &jcore_aic_irqdomain_ops, 112 - &jcore_aic); 110 + domain = irq_domain_create_legacy(of_fwnode_handle(node), dom_sz - min_irq, min_irq, 111 + min_irq, &jcore_aic_irqdomain_ops, &jcore_aic); 113 112 if (!domain) 114 113 return -ENOMEM; 115 114
+2 -2
drivers/irqchip/irq-keystone.c
··· 157 157 kirq->chip.irq_mask = keystone_irq_setmask; 158 158 kirq->chip.irq_unmask = keystone_irq_unmask; 159 159 160 - kirq->irqd = irq_domain_add_linear(np, KEYSTONE_N_IRQ, 161 - &keystone_irq_ops, kirq); 160 + kirq->irqd = irq_domain_create_linear(of_fwnode_handle(np), KEYSTONE_N_IRQ, 161 + &keystone_irq_ops, kirq); 162 162 if (!kirq->irqd) { 163 163 dev_err(dev, "IRQ domain registration failed\n"); 164 164 return -ENODEV;
+1 -1
drivers/irqchip/irq-lan966x-oic.c
··· 220 220 .exit = lan966x_oic_chip_exit, 221 221 }; 222 222 struct irq_domain_info d_info = { 223 - .fwnode = of_node_to_fwnode(pdev->dev.of_node), 223 + .fwnode = of_fwnode_handle(pdev->dev.of_node), 224 224 .domain_flags = IRQ_DOMAIN_FLAG_DESTROY_GC, 225 225 .size = LAN966X_OIC_NR_IRQ, 226 226 .hwirq_max = LAN966X_OIC_NR_IRQ,
+1 -1
drivers/irqchip/irq-loongarch-cpu.c
··· 100 100 static int __init cpuintc_of_init(struct device_node *of_node, 101 101 struct device_node *parent) 102 102 { 103 - cpuintc_handle = of_node_to_fwnode(of_node); 103 + cpuintc_handle = of_fwnode_handle(of_node); 104 104 105 105 irq_domain = irq_domain_create_linear(cpuintc_handle, EXCCODE_INT_NUM, 106 106 &loongarch_cpu_intc_irq_domain_ops, NULL);
+1 -1
drivers/irqchip/irq-loongson-eiointc.c
··· 554 554 priv->vec_count = VEC_COUNT; 555 555 556 556 priv->node = 0; 557 - priv->domain_handle = of_node_to_fwnode(of_node); 557 + priv->domain_handle = of_fwnode_handle(of_node); 558 558 559 559 ret = eiointc_init(priv, parent_irq, 0); 560 560 if (ret < 0)
+1 -1
drivers/irqchip/irq-loongson-htvec.c
··· 248 248 } 249 249 250 250 err = htvec_init(res.start, resource_size(&res), 251 - num_parents, parent_irq, of_node_to_fwnode(node)); 251 + num_parents, parent_irq, of_fwnode_handle(node)); 252 252 if (err < 0) 253 253 return err; 254 254
+1 -1
drivers/irqchip/irq-loongson-liointc.c
··· 358 358 } 359 359 360 360 err = liointc_init(res.start, resource_size(&res), 361 - revision, of_node_to_fwnode(node), node); 361 + revision, of_fwnode_handle(node), node); 362 362 if (err < 0) 363 363 return err; 364 364
+1 -1
drivers/irqchip/irq-loongson-pch-msi.c
··· 243 243 return -EINVAL; 244 244 } 245 245 246 - err = pch_msi_init(res.start, irq_base, irq_count, parent_domain, of_node_to_fwnode(node)); 246 + err = pch_msi_init(res.start, irq_base, irq_count, parent_domain, of_fwnode_handle(node)); 247 247 if (err < 0) 248 248 return err; 249 249
+1 -1
drivers/irqchip/irq-loongson-pch-pic.c
··· 392 392 } 393 393 394 394 err = pch_pic_init(res.start, resource_size(&res), vec_base, 395 - parent_domain, of_node_to_fwnode(node), 0); 395 + parent_domain, of_fwnode_handle(node), 0); 396 396 if (err < 0) 397 397 return err; 398 398
+2 -2
drivers/irqchip/irq-lpc32xx.c
··· 210 210 return -EINVAL; 211 211 } 212 212 213 - irqc->domain = irq_domain_add_linear(node, NR_LPC32XX_IC_IRQS, 214 - &lpc32xx_irq_domain_ops, irqc); 213 + irqc->domain = irq_domain_create_linear(of_fwnode_handle(node), NR_LPC32XX_IC_IRQS, 214 + &lpc32xx_irq_domain_ops, irqc); 215 215 if (!irqc->domain) { 216 216 pr_err("unable to add irq domain\n"); 217 217 iounmap(irqc->base);
+2 -2
drivers/irqchip/irq-ls-extirq.c
··· 208 208 of_device_is_compatible(node, "fsl,ls1043a-extirq"); 209 209 raw_spin_lock_init(&priv->lock); 210 210 211 - domain = irq_domain_add_hierarchy(parent_domain, 0, priv->nirq, node, 212 - &extirq_domain_ops, priv); 211 + domain = irq_domain_create_hierarchy(parent_domain, 0, priv->nirq, of_fwnode_handle(node), 212 + &extirq_domain_ops, priv); 213 213 if (!domain) { 214 214 ret = -ENOMEM; 215 215 goto err_add_hierarchy;
+5 -5
drivers/irqchip/irq-ls-scfg-msi.c
··· 215 215 static int ls_scfg_msi_domains_init(struct ls_scfg_msi *msi_data) 216 216 { 217 217 /* Initialize MSI domain parent */ 218 - msi_data->parent = irq_domain_add_linear(NULL, 219 - msi_data->irqs_num, 220 - &ls_scfg_msi_domain_ops, 221 - msi_data); 218 + msi_data->parent = irq_domain_create_linear(NULL, 219 + msi_data->irqs_num, 220 + &ls_scfg_msi_domain_ops, 221 + msi_data); 222 222 if (!msi_data->parent) { 223 223 dev_err(&msi_data->pdev->dev, "failed to create IRQ domain\n"); 224 224 return -ENOMEM; 225 225 } 226 226 227 227 msi_data->msi_domain = pci_msi_create_irq_domain( 228 - of_node_to_fwnode(msi_data->pdev->dev.of_node), 228 + of_fwnode_handle(msi_data->pdev->dev.of_node), 229 229 &ls_scfg_msi_domain_info, 230 230 msi_data->parent); 231 231 if (!msi_data->msi_domain) {
+2 -2
drivers/irqchip/irq-ls1x.c
··· 126 126 } 127 127 128 128 /* Set up an IRQ domain */ 129 - priv->domain = irq_domain_add_linear(node, 32, &irq_generic_chip_ops, 130 - NULL); 129 + priv->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &irq_generic_chip_ops, 130 + NULL); 131 131 if (!priv->domain) { 132 132 pr_err("ls1x-irq: cannot add IRQ domain\n"); 133 133 err = -ENOMEM;
+3 -2
drivers/irqchip/irq-mchp-eic.c
··· 248 248 eic->irqs[i] = irq.args[1]; 249 249 } 250 250 251 - eic->domain = irq_domain_add_hierarchy(parent_domain, 0, MCHP_EIC_NIRQ, 252 - node, &mchp_eic_domain_ops, eic); 251 + eic->domain = irq_domain_create_hierarchy(parent_domain, 0, MCHP_EIC_NIRQ, 252 + of_fwnode_handle(node), &mchp_eic_domain_ops, 253 + eic); 253 254 if (!eic->domain) { 254 255 pr_err("%pOF: Failed to add domain\n", node); 255 256 ret = -ENODEV;
+1 -1
drivers/irqchip/irq-meson-gpio.c
··· 607 607 608 608 domain = irq_domain_create_hierarchy(parent_domain, 0, 609 609 ctl->params->nr_hwirq, 610 - of_node_to_fwnode(node), 610 + of_fwnode_handle(node), 611 611 &meson_gpio_irq_domain_ops, 612 612 ctl); 613 613 if (!domain) {
+5 -8
drivers/irqchip/irq-mips-cpu.c
··· 238 238 struct cpu_ipi_domain_state *ipi_domain_state; 239 239 240 240 ipi_domain_state = kzalloc(sizeof(*ipi_domain_state), GFP_KERNEL); 241 - ipi_domain = irq_domain_add_hierarchy(irq_domain, 242 - IRQ_DOMAIN_FLAG_IPI_SINGLE, 243 - 2, of_node, 244 - &mips_cpu_ipi_chip_ops, 245 - ipi_domain_state); 241 + ipi_domain = irq_domain_create_hierarchy(irq_domain, IRQ_DOMAIN_FLAG_IPI_SINGLE, 2, 242 + of_fwnode_handle(of_node), 243 + &mips_cpu_ipi_chip_ops, ipi_domain_state); 246 244 if (!ipi_domain) 247 245 panic("Failed to add MIPS CPU IPI domain"); 248 246 irq_domain_update_bus_token(ipi_domain, DOMAIN_BUS_IPI); ··· 258 260 clear_c0_status(ST0_IM); 259 261 clear_c0_cause(CAUSEF_IP); 260 262 261 - irq_domain = irq_domain_add_legacy(of_node, 8, MIPS_CPU_IRQ_BASE, 0, 262 - &mips_cpu_intc_irq_domain_ops, 263 - NULL); 263 + irq_domain = irq_domain_create_legacy(of_fwnode_handle(of_node), 8, MIPS_CPU_IRQ_BASE, 0, 264 + &mips_cpu_intc_irq_domain_ops, NULL); 264 265 if (!irq_domain) 265 266 panic("Failed to add irqdomain for MIPS CPU"); 266 267
+8 -7
drivers/irqchip/irq-mips-gic.c
··· 841 841 struct irq_domain *gic_ipi_domain; 842 842 unsigned int v[2], num_ipis; 843 843 844 - gic_ipi_domain = irq_domain_add_hierarchy(gic_irq_domain, 845 - IRQ_DOMAIN_FLAG_IPI_PER_CPU, 846 - GIC_NUM_LOCAL_INTRS + gic_shared_intrs, 847 - node, &gic_ipi_domain_ops, NULL); 844 + gic_ipi_domain = irq_domain_create_hierarchy(gic_irq_domain, IRQ_DOMAIN_FLAG_IPI_PER_CPU, 845 + GIC_NUM_LOCAL_INTRS + gic_shared_intrs, 846 + of_fwnode_handle(node), &gic_ipi_domain_ops, 847 + NULL); 848 848 if (!gic_ipi_domain) { 849 849 pr_err("Failed to add IPI domain"); 850 850 return -ENXIO; ··· 963 963 gic_irq_dispatch); 964 964 } 965 965 966 - gic_irq_domain = irq_domain_add_simple(node, GIC_NUM_LOCAL_INTRS + 967 - gic_shared_intrs, 0, 968 - &gic_irq_domain_ops, NULL); 966 + gic_irq_domain = irq_domain_create_simple(of_fwnode_handle(node), 967 + GIC_NUM_LOCAL_INTRS + 968 + gic_shared_intrs, 0, 969 + &gic_irq_domain_ops, NULL); 969 970 if (!gic_irq_domain) { 970 971 pr_err("Failed to add IRQ domain"); 971 972 return -ENXIO;
+6 -6
drivers/irqchip/irq-mmp.c
··· 261 261 } 262 262 263 263 icu_data[0].virq_base = 0; 264 - icu_data[0].domain = irq_domain_add_linear(node, nr_irqs, 265 - &mmp_irq_domain_ops, 266 - &icu_data[0]); 264 + icu_data[0].domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irqs, 265 + &mmp_irq_domain_ops, 266 + &icu_data[0]); 267 267 for (irq = 0; irq < nr_irqs; irq++) { 268 268 ret = irq_create_mapping(icu_data[0].domain, irq); 269 269 if (!ret) { ··· 391 391 return -EINVAL; 392 392 393 393 icu_data[i].virq_base = 0; 394 - icu_data[i].domain = irq_domain_add_linear(node, nr_irqs, 395 - &mmp_irq_domain_ops, 396 - &icu_data[i]); 394 + icu_data[i].domain = irq_domain_create_linear(of_fwnode_handle(node), nr_irqs, 395 + &mmp_irq_domain_ops, 396 + &icu_data[i]); 397 397 for (irq = 0; irq < nr_irqs; irq++) { 398 398 ret = irq_create_mapping(icu_data[i].domain, irq); 399 399 if (!ret) {
+2 -2
drivers/irqchip/irq-mscc-ocelot.c
··· 131 131 if (!parent_irq) 132 132 return -EINVAL; 133 133 134 - domain = irq_domain_add_linear(node, p->n_irq, 135 - &irq_generic_chip_ops, NULL); 134 + domain = irq_domain_create_linear(of_fwnode_handle(node), p->n_irq, 135 + &irq_generic_chip_ops, NULL); 136 136 if (!domain) { 137 137 pr_err("%pOFn: unable to add irq domain\n", node); 138 138 return -ENOMEM;
+2 -2
drivers/irqchip/irq-mst-intc.c
··· 273 273 raw_spin_lock_init(&cd->lock); 274 274 cd->irq_start = irq_start; 275 275 cd->nr_irqs = irq_end - irq_start + 1; 276 - domain = irq_domain_add_hierarchy(domain_parent, 0, cd->nr_irqs, dn, 277 - &mst_intc_domain_ops, cd); 276 + domain = irq_domain_create_hierarchy(domain_parent, 0, cd->nr_irqs, of_fwnode_handle(dn), 277 + &mst_intc_domain_ops, cd); 278 278 if (!domain) { 279 279 iounmap(cd->base); 280 280 kfree(cd);
+2 -3
drivers/irqchip/irq-mtk-cirq.c
··· 336 336 cirq_data->offsets = match->data; 337 337 338 338 irq_num = cirq_data->ext_irq_end - cirq_data->ext_irq_start + 1; 339 - domain = irq_domain_add_hierarchy(domain_parent, 0, 340 - irq_num, node, 341 - &cirq_domain_ops, cirq_data); 339 + domain = irq_domain_create_hierarchy(domain_parent, 0, irq_num, of_fwnode_handle(node), 340 + &cirq_domain_ops, cirq_data); 342 341 if (!domain) { 343 342 ret = -ENOMEM; 344 343 goto out_unmap;
+2 -2
drivers/irqchip/irq-mtk-sysirq.c
··· 207 207 chip_data->which_word[i] = word; 208 208 } 209 209 210 - domain = irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node, 211 - &sysirq_domain_ops, chip_data); 210 + domain = irq_domain_create_hierarchy(domain_parent, 0, intpol_num, of_fwnode_handle(node), 211 + &sysirq_domain_ops, chip_data); 212 212 if (!domain) { 213 213 ret = -ENOMEM; 214 214 goto out_free_which_word;
+2 -2
drivers/irqchip/irq-mvebu-pic.c
··· 150 150 return -EINVAL; 151 151 } 152 152 153 - pic->domain = irq_domain_add_linear(node, PIC_MAX_IRQS, 154 - &mvebu_pic_domain_ops, pic); 153 + pic->domain = irq_domain_create_linear(of_fwnode_handle(node), PIC_MAX_IRQS, 154 + &mvebu_pic_domain_ops, pic); 155 155 if (!pic->domain) { 156 156 dev_err(&pdev->dev, "Failed to allocate irq domain\n"); 157 157 return -ENOMEM;
+2 -2
drivers/irqchip/irq-mxs.c
··· 162 162 static void __init icoll_add_domain(struct device_node *np, 163 163 int num) 164 164 { 165 - icoll_domain = irq_domain_add_linear(np, num, 166 - &icoll_irq_domain_ops, NULL); 165 + icoll_domain = irq_domain_create_linear(of_fwnode_handle(np), num, 166 + &icoll_irq_domain_ops, NULL); 167 167 168 168 if (!icoll_domain) 169 169 panic("%pOF: unable to create irq domain", np);
+1 -1
drivers/irqchip/irq-nvic.c
··· 90 90 irqs = NVIC_MAX_IRQ; 91 91 92 92 nvic_irq_domain = 93 - irq_domain_add_linear(node, irqs, &nvic_irq_domain_ops, NULL); 93 + irq_domain_create_linear(of_fwnode_handle(node), irqs, &nvic_irq_domain_ops, NULL); 94 94 95 95 if (!nvic_irq_domain) { 96 96 pr_warn("Failed to allocate irq domain\n");
+2 -2
drivers/irqchip/irq-omap-intc.c
··· 248 248 if (WARN_ON(!omap_irq_base)) 249 249 return -ENOMEM; 250 250 251 - domain = irq_domain_add_linear(node, omap_nr_irqs, 251 + domain = irq_domain_create_linear(of_fwnode_handle(node), omap_nr_irqs, 252 252 &irq_generic_chip_ops, NULL); 253 253 254 254 omap_irq_soft_reset(); ··· 274 274 irq_base = 0; 275 275 } 276 276 277 - domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0, 277 + domain = irq_domain_create_legacy(of_fwnode_handle(node), omap_nr_irqs, irq_base, 0, 278 278 &irq_domain_simple_ops, NULL); 279 279 280 280 omap_irq_soft_reset();
+2 -2
drivers/irqchip/irq-or1k-pic.c
··· 144 144 /* Disable all interrupts until explicitly requested */ 145 145 mtspr(SPR_PICMR, (0UL)); 146 146 147 - root_domain = irq_domain_add_linear(node, 32, &or1k_irq_domain_ops, 148 - pic); 147 + root_domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &or1k_irq_domain_ops, 148 + pic); 149 149 150 150 set_handle_irq(or1k_pic_handle_irq); 151 151
+3 -3
drivers/irqchip/irq-orion.c
··· 59 59 /* count number of irq chips by valid reg addresses */ 60 60 num_chips = of_address_count(np); 61 61 62 - orion_irq_domain = irq_domain_add_linear(np, 62 + orion_irq_domain = irq_domain_create_linear(of_fwnode_handle(np), 63 63 num_chips * ORION_IRQS_PER_CHIP, 64 64 &irq_generic_chip_ops, NULL); 65 65 if (!orion_irq_domain) ··· 146 146 /* get optional number of interrupts provided */ 147 147 of_property_read_u32(np, "marvell,#interrupts", &nrirqs); 148 148 149 - domain = irq_domain_add_linear(np, nrirqs, 150 - &irq_generic_chip_ops, NULL); 149 + domain = irq_domain_create_linear(of_fwnode_handle(np), nrirqs, 150 + &irq_generic_chip_ops, NULL); 151 151 if (!domain) { 152 152 pr_err("%pOFn: unable to add irq domain\n", np); 153 153 return -ENOMEM;
+2 -2
drivers/irqchip/irq-owl-sirq.c
··· 323 323 owl_sirq_clear_set_extctl(chip_data, 0, INTC_EXTCTL_CLK_SEL, i); 324 324 } 325 325 326 - domain = irq_domain_add_hierarchy(parent_domain, 0, NUM_SIRQ, node, 327 - &owl_sirq_domain_ops, chip_data); 326 + domain = irq_domain_create_hierarchy(parent_domain, 0, NUM_SIRQ, of_fwnode_handle(node), 327 + &owl_sirq_domain_ops, chip_data); 328 328 if (!domain) { 329 329 pr_err("%pOF: failed to add domain\n", node); 330 330 ret = -ENOMEM;
+3 -3
drivers/irqchip/irq-pic32-evic.c
··· 227 227 goto err_iounmap; 228 228 } 229 229 230 - evic_irq_domain = irq_domain_add_linear(node, nchips * 32, 231 - &pic32_irq_domain_ops, 232 - priv); 230 + evic_irq_domain = irq_domain_create_linear(of_fwnode_handle(node), nchips * 32, 231 + &pic32_irq_domain_ops, 232 + priv); 233 233 if (!evic_irq_domain) { 234 234 ret = -ENOMEM; 235 235 goto err_free_priv;
+2 -2
drivers/irqchip/irq-pruss-intc.c
··· 555 555 556 556 mutex_init(&intc->lock); 557 557 558 - intc->domain = irq_domain_add_linear(dev->of_node, max_system_events, 559 - &pruss_intc_irq_domain_ops, intc); 558 + intc->domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), max_system_events, 559 + &pruss_intc_irq_domain_ops, intc); 560 560 if (!intc->domain) 561 561 return -ENOMEM; 562 562
+1 -1
drivers/irqchip/irq-qcom-mpm.c
··· 450 450 451 451 priv->domain = irq_domain_create_hierarchy(parent_domain, 452 452 IRQ_DOMAIN_FLAG_QCOM_MPM_WAKEUP, pin_cnt, 453 - of_node_to_fwnode(np), &qcom_mpm_ops, priv); 453 + of_fwnode_handle(np), &qcom_mpm_ops, priv); 454 454 if (!priv->domain) { 455 455 dev_err(dev, "failed to create MPM domain\n"); 456 456 ret = -ENOMEM;
+1 -1
drivers/irqchip/irq-realtek-rtl.c
··· 162 162 else if (!parent_irq) 163 163 return -ENODEV; 164 164 165 - domain = irq_domain_add_linear(node, RTL_ICTL_NUM_INPUTS, &irq_domain_ops, NULL); 165 + domain = irq_domain_create_linear(of_fwnode_handle(node), RTL_ICTL_NUM_INPUTS, &irq_domain_ops, NULL); 166 166 if (!domain) 167 167 return -ENOMEM; 168 168
+4 -2
drivers/irqchip/irq-renesas-intc-irqpin.c
··· 513 513 irq_chip->irq_set_wake = intc_irqpin_irq_set_wake; 514 514 irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND; 515 515 516 - p->irq_domain = irq_domain_add_simple(dev->of_node, nirqs, 0, 517 - &intc_irqpin_irq_domain_ops, p); 516 + p->irq_domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node), 517 + nirqs, 0, 518 + &intc_irqpin_irq_domain_ops, 519 + p); 518 520 if (!p->irq_domain) { 519 521 ret = -ENXIO; 520 522 dev_err(dev, "cannot initialize irq domain\n");
+2 -2
drivers/irqchip/irq-renesas-irqc.c
··· 168 168 169 169 p->cpu_int_base = p->iomem + IRQC_INT_CPU_BASE(0); /* SYS-SPI */ 170 170 171 - p->irq_domain = irq_domain_add_linear(dev->of_node, p->number_of_irqs, 172 - &irq_generic_chip_ops, p); 171 + p->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), p->number_of_irqs, 172 + &irq_generic_chip_ops, p); 173 173 if (!p->irq_domain) { 174 174 ret = -ENXIO; 175 175 dev_err(dev, "cannot initialize irq domain\n");
+3 -3
drivers/irqchip/irq-renesas-rza1.c
··· 231 231 priv->chip.irq_set_type = rza1_irqc_set_type; 232 232 priv->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE; 233 233 234 - priv->irq_domain = irq_domain_add_hierarchy(parent, 0, IRQC_NUM_IRQ, 235 - np, &rza1_irqc_domain_ops, 236 - priv); 234 + priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ, 235 + of_fwnode_handle(np), &rza1_irqc_domain_ops, 236 + priv); 237 237 if (!priv->irq_domain) { 238 238 dev_err(dev, "cannot initialize irq domain\n"); 239 239 ret = -ENOMEM;
+3 -3
drivers/irqchip/irq-renesas-rzg2l.c
··· 574 574 575 575 raw_spin_lock_init(&rzg2l_irqc_data->lock); 576 576 577 - irq_domain = irq_domain_add_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, 578 - node, &rzg2l_irqc_domain_ops, 579 - rzg2l_irqc_data); 577 + irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, 578 + of_fwnode_handle(node), &rzg2l_irqc_domain_ops, 579 + rzg2l_irqc_data); 580 580 if (!irq_domain) { 581 581 pm_runtime_put(dev); 582 582 return dev_err_probe(dev, -ENOMEM, "failed to add irq domain\n");
+3 -2
drivers/irqchip/irq-renesas-rzv2h.c
··· 522 522 523 523 raw_spin_lock_init(&rzv2h_icu_data->lock); 524 524 525 - irq_domain = irq_domain_add_hierarchy(parent_domain, 0, ICU_NUM_IRQ, node, 526 - &rzv2h_icu_domain_ops, rzv2h_icu_data); 525 + irq_domain = irq_domain_create_hierarchy(parent_domain, 0, ICU_NUM_IRQ, 526 + of_fwnode_handle(node), &rzv2h_icu_domain_ops, 527 + rzv2h_icu_data); 527 528 if (!irq_domain) { 528 529 dev_err(&pdev->dev, "failed to add irq domain\n"); 529 530 ret = -ENOMEM;
+1 -1
drivers/irqchip/irq-riscv-intc.c
··· 242 242 chip = &andes_intc_chip; 243 243 } 244 244 245 - return riscv_intc_init_common(of_node_to_fwnode(node), chip); 245 + return riscv_intc_init_common(of_fwnode_handle(node), chip); 246 246 } 247 247 248 248 IRQCHIP_DECLARE(riscv, "riscv,cpu-intc", riscv_intc_init);
+1 -1
drivers/irqchip/irq-sa11x0.c
··· 162 162 */ 163 163 writel_relaxed(1, iobase + ICCR); 164 164 165 - sa1100_normal_irqdomain = irq_domain_add_simple(NULL, 165 + sa1100_normal_irqdomain = irq_domain_create_simple(NULL, 166 166 32, irq_start, 167 167 &sa1100_normal_irqdomain_ops, NULL); 168 168
+3 -3
drivers/irqchip/irq-sni-exiu.c
··· 249 249 return -ENXIO; 250 250 } 251 251 252 - data = exiu_init(of_node_to_fwnode(node), &res); 252 + data = exiu_init(of_fwnode_handle(node), &res); 253 253 if (IS_ERR(data)) 254 254 return PTR_ERR(data); 255 255 256 - domain = irq_domain_add_hierarchy(parent_domain, 0, NUM_IRQS, node, 257 - &exiu_domain_ops, data); 256 + domain = irq_domain_create_hierarchy(parent_domain, 0, NUM_IRQS, of_fwnode_handle(node), 257 + &exiu_domain_ops, data); 258 258 if (!domain) { 259 259 pr_err("%pOF: failed to allocate domain\n", node); 260 260 goto out_unmap;
+2 -2
drivers/irqchip/irq-sp7021-intc.c
··· 256 256 writel_relaxed(~0, REG_INTR_CLEAR + i * 4); 257 257 } 258 258 259 - sp_intc.domain = irq_domain_add_linear(node, SP_INTC_NR_IRQS, 260 - &sp_intc_dm_ops, &sp_intc); 259 + sp_intc.domain = irq_domain_create_linear(of_fwnode_handle(node), SP_INTC_NR_IRQS, 260 + &sp_intc_dm_ops, &sp_intc); 261 261 if (!sp_intc.domain) { 262 262 ret = -ENOMEM; 263 263 goto out_unmap1;
+2 -2
drivers/irqchip/irq-starfive-jh8100-intc.c
··· 158 158 159 159 raw_spin_lock_init(&irqc->lock); 160 160 161 - irqc->domain = irq_domain_add_linear(intc, STARFIVE_INTC_SRC_IRQ_NUM, 162 - &starfive_intc_domain_ops, irqc); 161 + irqc->domain = irq_domain_create_linear(of_fwnode_handle(intc), STARFIVE_INTC_SRC_IRQ_NUM, 162 + &starfive_intc_domain_ops, irqc); 163 163 if (!irqc->domain) { 164 164 pr_err("Unable to create IRQ domain\n"); 165 165 ret = -EINVAL;
+2 -2
drivers/irqchip/irq-stm32-exti.c
··· 335 335 if (!host_data) 336 336 return -ENOMEM; 337 337 338 - domain = irq_domain_add_linear(node, drv_data->bank_nr * IRQS_PER_BANK, 339 - &irq_exti_domain_ops, NULL); 338 + domain = irq_domain_create_linear(of_fwnode_handle(node), drv_data->bank_nr * IRQS_PER_BANK, 339 + &irq_exti_domain_ops, NULL); 340 340 if (!domain) { 341 341 pr_err("%pOFn: Could not register interrupt domain.\n", 342 342 node);
+4 -5
drivers/irqchip/irq-stm32mp-exti.c
··· 531 531 if (ret) 532 532 return ret; 533 533 /* we only support one parent, so far */ 534 - if (of_node_to_fwnode(out_irq.np) != dm->parent->fwnode) 534 + if (of_fwnode_handle(out_irq.np) != dm->parent->fwnode) 535 535 return -EINVAL; 536 536 537 537 of_phandle_args_to_fwspec(out_irq.np, out_irq.args, ··· 682 682 return -EINVAL; 683 683 } 684 684 685 - domain = irq_domain_add_hierarchy(parent_domain, 0, 686 - drv_data->bank_nr * IRQS_PER_BANK, 687 - np, &stm32mp_exti_domain_ops, 688 - host_data); 685 + domain = irq_domain_create_hierarchy(parent_domain, 0, drv_data->bank_nr * IRQS_PER_BANK, 686 + of_fwnode_handle(np), &stm32mp_exti_domain_ops, 687 + host_data); 689 688 690 689 if (!domain) { 691 690 dev_err(dev, "Could not register exti domain\n");
+1 -1
drivers/irqchip/irq-sun4i.c
··· 133 133 /* Configure the external interrupt source type */ 134 134 writel(0x00, irq_ic_data->irq_base + SUN4I_IRQ_NMI_CTRL_REG); 135 135 136 - irq_ic_data->irq_domain = irq_domain_add_linear(node, 3 * 32, 136 + irq_ic_data->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), 3 * 32, 137 137 &sun4i_irq_ops, NULL); 138 138 if (!irq_ic_data->irq_domain) 139 139 panic("%pOF: unable to create IRQ domain\n", node);
+2 -2
drivers/irqchip/irq-sun6i-r.c
··· 338 338 return PTR_ERR(base); 339 339 } 340 340 341 - domain = irq_domain_add_hierarchy(parent_domain, 0, 0, node, 342 - &sun6i_r_intc_domain_ops, NULL); 341 + domain = irq_domain_create_hierarchy(parent_domain, 0, 0, of_fwnode_handle(node), 342 + &sun6i_r_intc_domain_ops, NULL); 343 343 if (!domain) { 344 344 pr_err("%pOF: Failed to allocate domain\n", node); 345 345 iounmap(base);
+1 -1
drivers/irqchip/irq-sunxi-nmi.c
··· 154 154 struct irq_domain *domain; 155 155 int ret; 156 156 157 - domain = irq_domain_add_linear(node, 1, &irq_generic_chip_ops, NULL); 157 + domain = irq_domain_create_linear(of_fwnode_handle(node), 1, &irq_generic_chip_ops, NULL); 158 158 if (!domain) { 159 159 pr_err("Could not register interrupt domain.\n"); 160 160 return -ENOMEM;
+4 -4
drivers/irqchip/irq-tb10x.c
··· 114 114 goto ioremap_fail; 115 115 } 116 116 117 - domain = irq_domain_add_linear(ictl, AB_IRQCTL_MAXIRQ, 118 - &irq_generic_chip_ops, NULL); 117 + domain = irq_domain_create_linear(of_fwnode_handle(ictl), AB_IRQCTL_MAXIRQ, 118 + &irq_generic_chip_ops, NULL); 119 119 if (!domain) { 120 120 ret = -ENOMEM; 121 121 pr_err("%pOFn: Could not register interrupt domain.\n", 122 122 ictl); 123 - goto irq_domain_add_fail; 123 + goto irq_domain_create_fail; 124 124 } 125 125 126 126 ret = irq_alloc_domain_generic_chips(domain, AB_IRQCTL_MAXIRQ, ··· 167 167 168 168 gc_alloc_fail: 169 169 irq_domain_remove(domain); 170 - irq_domain_add_fail: 170 + irq_domain_create_fail: 171 171 iounmap(reg_base); 172 172 ioremap_fail: 173 173 release_mem_region(mem.start, resource_size(&mem));
+2 -3
drivers/irqchip/irq-tegra.c
··· 330 330 node, num_ictlrs, soc->num_ictlrs); 331 331 332 332 333 - domain = irq_domain_add_hierarchy(parent_domain, 0, num_ictlrs * 32, 334 - node, &tegra_ictlr_domain_ops, 335 - lic); 333 + domain = irq_domain_create_hierarchy(parent_domain, 0, num_ictlrs * 32, 334 + of_fwnode_handle(node), &tegra_ictlr_domain_ops, lic); 336 335 if (!domain) { 337 336 pr_err("%pOF: failed to allocated domain\n", node); 338 337 err = -ENOMEM;
+5 -5
drivers/irqchip/irq-ti-sci-inta.c
··· 233 233 INIT_LIST_HEAD(&vint_desc->list); 234 234 235 235 parent_node = of_irq_find_parent(dev_of_node(&inta->pdev->dev)); 236 - parent_fwspec.fwnode = of_node_to_fwnode(parent_node); 236 + parent_fwspec.fwnode = of_fwnode_handle(parent_node); 237 237 238 238 if (of_device_is_compatible(parent_node, "arm,gic-v3")) { 239 239 /* Parent is GIC */ ··· 701 701 if (ret) 702 702 return ret; 703 703 704 - domain = irq_domain_add_linear(dev_of_node(dev), 705 - ti_sci_get_num_resources(inta->vint), 706 - &ti_sci_inta_irq_domain_ops, inta); 704 + domain = irq_domain_create_linear(of_fwnode_handle(dev_of_node(dev)), 705 + ti_sci_get_num_resources(inta->vint), 706 + &ti_sci_inta_irq_domain_ops, inta); 707 707 if (!domain) { 708 708 dev_err(dev, "Failed to allocate IRQ domain\n"); 709 709 return -ENOMEM; 710 710 } 711 711 712 - msi_domain = ti_sci_inta_msi_create_irq_domain(of_node_to_fwnode(node), 712 + msi_domain = ti_sci_inta_msi_create_irq_domain(of_fwnode_handle(node), 713 713 &ti_sci_inta_msi_domain_info, 714 714 domain); 715 715 if (!msi_domain) {
+4 -3
drivers/irqchip/irq-ti-sci-intr.c
··· 149 149 goto err_irqs; 150 150 151 151 parent_node = of_irq_find_parent(dev_of_node(intr->dev)); 152 - fwspec.fwnode = of_node_to_fwnode(parent_node); 152 + fwspec.fwnode = of_fwnode_handle(parent_node); 153 153 154 154 if (of_device_is_compatible(parent_node, "arm,gic-v3")) { 155 155 /* Parent is GIC */ ··· 274 274 return PTR_ERR(intr->out_irqs); 275 275 } 276 276 277 - domain = irq_domain_add_hierarchy(parent_domain, 0, 0, dev_of_node(dev), 278 - &ti_sci_intr_irq_domain_ops, intr); 277 + domain = irq_domain_create_hierarchy(parent_domain, 0, 0, 278 + of_fwnode_handle(dev_of_node(dev)), 279 + &ti_sci_intr_irq_domain_ops, intr); 279 280 if (!domain) { 280 281 dev_err(dev, "Failed to allocate IRQ domain\n"); 281 282 return -ENOMEM;
+1 -1
drivers/irqchip/irq-ts4800.c
··· 125 125 return -EINVAL; 126 126 } 127 127 128 - data->domain = irq_domain_add_linear(node, 8, &ts4800_ic_ops, data); 128 + data->domain = irq_domain_create_linear(of_fwnode_handle(node), 8, &ts4800_ic_ops, data); 129 129 if (!data->domain) { 130 130 dev_err(&pdev->dev, "cannot add IRQ domain\n"); 131 131 return -ENOMEM;
+1 -1
drivers/irqchip/irq-uniphier-aidet.c
··· 188 188 priv->domain = irq_domain_create_hierarchy( 189 189 parent_domain, 0, 190 190 UNIPHIER_AIDET_NR_IRQS, 191 - of_node_to_fwnode(dev->of_node), 191 + of_fwnode_handle(dev->of_node), 192 192 &uniphier_aidet_domain_ops, priv); 193 193 if (!priv->domain) 194 194 return -ENOMEM;
+2 -2
drivers/irqchip/irq-versatile-fpga.c
··· 176 176 f); 177 177 } 178 178 179 - f->domain = irq_domain_add_linear(node, fls(valid), 180 - &fpga_irqdomain_ops, f); 179 + f->domain = irq_domain_create_linear(of_fwnode_handle(node), fls(valid), 180 + &fpga_irqdomain_ops, f); 181 181 182 182 /* This will allocate all valid descriptors in the linear case */ 183 183 for (i = 0; i < fls(valid); i++)
+3 -3
drivers/irqchip/irq-vf610-mscm-ir.c
··· 209 209 regmap_read(mscm_cp_regmap, MSCM_CPxNUM, &cpuid); 210 210 mscm_ir_data->cpu_mask = 0x1 << cpuid; 211 211 212 - domain = irq_domain_add_hierarchy(domain_parent, 0, 213 - MSCM_IRSPRC_NUM, node, 214 - &mscm_irq_domain_ops, mscm_ir_data); 212 + domain = irq_domain_create_hierarchy(domain_parent, 0, MSCM_IRSPRC_NUM, 213 + of_fwnode_handle(node), &mscm_irq_domain_ops, 214 + mscm_ir_data); 215 215 if (!domain) { 216 216 ret = -ENOMEM; 217 217 goto out_unmap;
+3 -2
drivers/irqchip/irq-vic.c
··· 289 289 vic_handle_irq_cascaded, v); 290 290 } 291 291 292 - v->domain = irq_domain_add_simple(node, fls(valid_sources), irq, 293 - &vic_irqdomain_ops, v); 292 + v->domain = irq_domain_create_simple(of_fwnode_handle(node), 293 + fls(valid_sources), irq, 294 + &vic_irqdomain_ops, v); 294 295 /* create an IRQ mapping for each valid IRQ */ 295 296 for (i = 0; i < fls(valid_sources); i++) 296 297 if (valid_sources & (1 << i))
+1 -1
drivers/irqchip/irq-wpcm450-aic.c
··· 154 154 155 155 set_handle_irq(wpcm450_aic_handle_irq); 156 156 157 - aic->domain = irq_domain_add_linear(node, AIC_NUM_IRQS, &wpcm450_aic_ops, aic); 157 + aic->domain = irq_domain_create_linear(of_fwnode_handle(node), AIC_NUM_IRQS, &wpcm450_aic_ops, aic); 158 158 159 159 return 0; 160 160 }
+2 -2
drivers/irqchip/irq-xilinx-intc.c
··· 212 212 xintc_write(irqc, MER, MER_HIE | MER_ME); 213 213 } 214 214 215 - irqc->root_domain = irq_domain_add_linear(intc, irqc->nr_irq, 216 - &xintc_irq_domain_ops, irqc); 215 + irqc->root_domain = irq_domain_create_linear(of_fwnode_handle(intc), irqc->nr_irq, 216 + &xintc_irq_domain_ops, irqc); 217 217 if (!irqc->root_domain) { 218 218 pr_err("irq-xilinx: Unable to create IRQ domain\n"); 219 219 ret = -EINVAL;
+2 -3
drivers/irqchip/irq-xtensa-mx.c
··· 167 167 int __init xtensa_mx_init_legacy(struct device_node *interrupt_parent) 168 168 { 169 169 struct irq_domain *root_domain = 170 - irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, 171 - &xtensa_mx_irq_domain_ops, 170 + irq_domain_create_legacy(NULL, NR_IRQS - 1, 1, 0, &xtensa_mx_irq_domain_ops, 172 171 &xtensa_mx_irq_chip); 173 172 xtensa_mx_init_common(root_domain); 174 173 return 0; ··· 177 178 struct device_node *interrupt_parent) 178 179 { 179 180 struct irq_domain *root_domain = 180 - irq_domain_add_linear(np, NR_IRQS, &xtensa_mx_irq_domain_ops, 181 + irq_domain_create_linear(of_fwnode_handle(np), NR_IRQS, &xtensa_mx_irq_domain_ops, 181 182 &xtensa_mx_irq_chip); 182 183 xtensa_mx_init_common(root_domain); 183 184 return 0;
+2 -2
drivers/irqchip/irq-xtensa-pic.c
··· 85 85 int __init xtensa_pic_init_legacy(struct device_node *interrupt_parent) 86 86 { 87 87 struct irq_domain *root_domain = 88 - irq_domain_add_legacy(NULL, NR_IRQS - 1, 1, 0, 88 + irq_domain_create_legacy(NULL, NR_IRQS - 1, 1, 0, 89 89 &xtensa_irq_domain_ops, &xtensa_irq_chip); 90 90 irq_set_default_domain(root_domain); 91 91 return 0; ··· 95 95 struct device_node *interrupt_parent) 96 96 { 97 97 struct irq_domain *root_domain = 98 - irq_domain_add_linear(np, NR_IRQS, &xtensa_irq_domain_ops, 98 + irq_domain_create_linear(of_fwnode_handle(np), NR_IRQS, &xtensa_irq_domain_ops, 99 99 &xtensa_irq_chip); 100 100 irq_set_default_domain(root_domain); 101 101 return 0;
+2 -2
drivers/irqchip/irq-zevio.c
··· 92 92 zevio_init_irq_base(zevio_irq_io + IO_IRQ_BASE); 93 93 zevio_init_irq_base(zevio_irq_io + IO_FIQ_BASE); 94 94 95 - zevio_irq_domain = irq_domain_add_linear(node, MAX_INTRS, 96 - &irq_generic_chip_ops, NULL); 95 + zevio_irq_domain = irq_domain_create_linear(of_fwnode_handle(node), MAX_INTRS, 96 + &irq_generic_chip_ops, NULL); 97 97 BUG_ON(!zevio_irq_domain); 98 98 99 99 ret = irq_alloc_domain_generic_chips(zevio_irq_domain, MAX_INTRS, 1,
+1 -1
drivers/irqchip/spear-shirq.c
··· 239 239 goto err_unmap; 240 240 } 241 241 242 - shirq_domain = irq_domain_add_legacy(np, nr_irqs, virq_base, 0, 242 + shirq_domain = irq_domain_create_legacy(of_fwnode_handle(np), nr_irqs, virq_base, 0, 243 243 &irq_domain_simple_ops, NULL); 244 244 if (WARN_ON(!shirq_domain)) { 245 245 pr_warn("%s: irq domain init failed\n", __func__);
+2 -2
drivers/mailbox/qcom-ipcc.c
··· 312 312 if (!name) 313 313 return -ENOMEM; 314 314 315 - ipcc->irq_domain = irq_domain_add_tree(pdev->dev.of_node, 316 - &qcom_ipcc_irq_ops, ipcc); 315 + ipcc->irq_domain = irq_domain_create_tree(of_fwnode_handle(pdev->dev.of_node), 316 + &qcom_ipcc_irq_ops, ipcc); 317 317 if (!ipcc->irq_domain) 318 318 return -ENOMEM; 319 319
+2 -4
drivers/memory/omap-gpmc.c
··· 1455 1455 gpmc->irq_chip.irq_unmask = gpmc_irq_unmask; 1456 1456 gpmc->irq_chip.irq_set_type = gpmc_irq_set_type; 1457 1457 1458 - gpmc_irq_domain = irq_domain_add_linear(gpmc->dev->of_node, 1459 - gpmc->nirqs, 1460 - &gpmc_irq_domain_ops, 1461 - gpmc); 1458 + gpmc_irq_domain = irq_domain_create_linear(of_fwnode_handle(gpmc->dev->of_node), 1459 + gpmc->nirqs, &gpmc_irq_domain_ops, gpmc); 1462 1460 if (!gpmc_irq_domain) { 1463 1461 dev_err(gpmc->dev, "IRQ domain add failed\n"); 1464 1462 return -ENODEV;
+2 -2
drivers/mfd/88pm860x-core.c
··· 624 624 ret = -EBUSY; 625 625 goto out; 626 626 } 627 - irq_domain_add_legacy(node, nr_irqs, chip->irq_base, 0, 628 - &pm860x_irq_domain_ops, chip); 627 + irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, chip->irq_base, 0, 628 + &pm860x_irq_domain_ops, chip); 629 629 chip->core_irq = i2c->irq; 630 630 if (!chip->core_irq) 631 631 goto out;
+3 -3
drivers/mfd/ab8500-core.c
··· 580 580 num_irqs = AB8500_NR_IRQS; 581 581 582 582 /* If ->irq_base is zero this will give a linear mapping */ 583 - ab8500->domain = irq_domain_add_simple(ab8500->dev->of_node, 584 - num_irqs, 0, 585 - &ab8500_irq_ops, ab8500); 583 + ab8500->domain = irq_domain_create_simple(of_fwnode_handle(ab8500->dev->of_node), 584 + num_irqs, 0, 585 + &ab8500_irq_ops, ab8500); 586 586 587 587 if (!ab8500->domain) { 588 588 dev_err(ab8500->dev, "Failed to create irqdomain\n");
+1 -2
drivers/mfd/arizona-irq.c
··· 312 312 flags |= arizona->pdata.irq_flags; 313 313 314 314 /* Allocate a virtual IRQ domain to distribute to the regmap domains */ 315 - arizona->virq = irq_domain_add_linear(NULL, 2, &arizona_domain_ops, 316 - arizona); 315 + arizona->virq = irq_domain_create_linear(NULL, 2, &arizona_domain_ops, arizona); 317 316 if (!arizona->virq) { 318 317 dev_err(arizona->dev, "Failed to add core IRQ domain\n"); 319 318 ret = -EINVAL;
+3 -3
drivers/mfd/db8500-prcmu.c
··· 2607 2607 { 2608 2608 int i; 2609 2609 2610 - db8500_irq_domain = irq_domain_add_simple( 2611 - np, NUM_PRCMU_WAKEUPS, 0, 2612 - &db8500_irq_ops, NULL); 2610 + db8500_irq_domain = irq_domain_create_simple(of_fwnode_handle(np), 2611 + NUM_PRCMU_WAKEUPS, 0, 2612 + &db8500_irq_ops, NULL); 2613 2613 2614 2614 if (!db8500_irq_domain) { 2615 2615 pr_err("Failed to create irqdomain\n");
+2 -3
drivers/mfd/fsl-imx25-tsadc.c
··· 65 65 struct mx25_tsadc *tsadc) 66 66 { 67 67 struct device *dev = &pdev->dev; 68 - struct device_node *np = dev->of_node; 69 68 int irq; 70 69 71 70 irq = platform_get_irq(pdev, 0); 72 71 if (irq < 0) 73 72 return irq; 74 73 75 - tsadc->domain = irq_domain_add_simple(np, 2, 0, &mx25_tsadc_domain_ops, 76 - tsadc); 74 + tsadc->domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node), 2, 0, 75 + &mx25_tsadc_domain_ops, tsadc); 77 76 if (!tsadc->domain) { 78 77 dev_err(dev, "Failed to add irq domain\n"); 79 78 return -ENOMEM;
+1 -1
drivers/mfd/lp8788-irq.c
··· 161 161 return -ENOMEM; 162 162 163 163 irqd->lp = lp; 164 - irqd->domain = irq_domain_add_linear(lp->dev->of_node, LP8788_INT_MAX, 164 + irqd->domain = irq_domain_create_linear(of_fwnode_handle(lp->dev->of_node), LP8788_INT_MAX, 165 165 &lp8788_domain_ops, irqd); 166 166 if (!irqd->domain) { 167 167 dev_err(lp->dev, "failed to add irq domain err\n");
+2 -2
drivers/mfd/max8925-core.c
··· 682 682 return -EBUSY; 683 683 } 684 684 685 - irq_domain_add_legacy(node, MAX8925_NR_IRQS, chip->irq_base, 0, 686 - &max8925_irq_domain_ops, chip); 685 + irq_domain_create_legacy(of_fwnode_handle(node), MAX8925_NR_IRQS, chip->irq_base, 0, 686 + &max8925_irq_domain_ops, chip); 687 687 688 688 /* request irq handler for pmic main irq*/ 689 689 chip->core_irq = irq;
+2 -2
drivers/mfd/max8997-irq.c
··· 327 327 true : false; 328 328 } 329 329 330 - domain = irq_domain_add_linear(NULL, MAX8997_IRQ_NR, 331 - &max8997_irq_domain_ops, max8997); 330 + domain = irq_domain_create_linear(NULL, MAX8997_IRQ_NR, 331 + &max8997_irq_domain_ops, max8997); 332 332 if (!domain) { 333 333 dev_err(max8997->dev, "could not create irq domain\n"); 334 334 return -ENODEV;
+1 -1
drivers/mfd/max8998-irq.c
··· 230 230 max8998_write_reg(max8998->i2c, MAX8998_REG_STATUSM1, 0xff); 231 231 max8998_write_reg(max8998->i2c, MAX8998_REG_STATUSM2, 0xff); 232 232 233 - domain = irq_domain_add_simple(NULL, MAX8998_IRQ_NR, 233 + domain = irq_domain_create_simple(NULL, MAX8998_IRQ_NR, 234 234 max8998->irq_base, &max8998_irq_domain_ops, max8998); 235 235 if (!domain) { 236 236 dev_err(max8998->dev, "could not create irq domain\n");
+3 -3
drivers/mfd/mt6358-irq.c
··· 272 272 irqd->pmic_ints[i].en_reg_shift * j, 0); 273 273 } 274 274 275 - chip->irq_domain = irq_domain_add_linear(chip->dev->of_node, 276 - irqd->num_pmic_irqs, 277 - &mt6358_irq_domain_ops, chip); 275 + chip->irq_domain = irq_domain_create_linear(of_fwnode_handle(chip->dev->of_node), 276 + irqd->num_pmic_irqs, 277 + &mt6358_irq_domain_ops, chip); 278 278 if (!chip->irq_domain) { 279 279 dev_err(chip->dev, "Could not create IRQ domain\n"); 280 280 return -ENODEV;
+2 -4
drivers/mfd/mt6397-irq.c
··· 216 216 regmap_write(chip->regmap, chip->int_con[2], 0x0); 217 217 218 218 chip->pm_nb.notifier_call = mt6397_irq_pm_notifier; 219 - chip->irq_domain = irq_domain_add_linear(chip->dev->of_node, 220 - MT6397_IRQ_NR, 221 - &mt6397_irq_domain_ops, 222 - chip); 219 + chip->irq_domain = irq_domain_create_linear(of_fwnode_handle(chip->dev->of_node), 220 + MT6397_IRQ_NR, &mt6397_irq_domain_ops, chip); 223 221 if (!chip->irq_domain) { 224 222 dev_err(chip->dev, "could not create irq domain\n"); 225 223 return -ENOMEM;
+2 -4
drivers/mfd/qcom-pm8xxx.c
··· 559 559 chip->pm_irq_data = data; 560 560 spin_lock_init(&chip->pm_irq_lock); 561 561 562 - chip->irqdomain = irq_domain_add_linear(pdev->dev.of_node, 563 - data->num_irqs, 564 - &pm8xxx_irq_domain_ops, 565 - chip); 562 + chip->irqdomain = irq_domain_create_linear(of_fwnode_handle(pdev->dev.of_node), 563 + data->num_irqs, &pm8xxx_irq_domain_ops, chip); 566 564 if (!chip->irqdomain) 567 565 return -ENODEV; 568 566
+1 -1
drivers/mfd/stmfx.c
··· 269 269 u32 irqoutpin = 0, irqtrigger; 270 270 int ret; 271 271 272 - stmfx->irq_domain = irq_domain_add_simple(stmfx->dev->of_node, 272 + stmfx->irq_domain = irq_domain_create_simple(of_fwnode_handle(stmfx->dev->of_node), 273 273 STMFX_REG_IRQ_SRC_MAX, 0, 274 274 &stmfx_irq_ops, stmfx); 275 275 if (!stmfx->irq_domain) {
+2 -2
drivers/mfd/stmpe.c
··· 1219 1219 int base = 0; 1220 1220 int num_irqs = stmpe->variant->num_irqs; 1221 1221 1222 - stmpe->domain = irq_domain_add_simple(np, num_irqs, base, 1223 - &stmpe_irq_ops, stmpe); 1222 + stmpe->domain = irq_domain_create_simple(of_fwnode_handle(np), num_irqs, 1223 + base, &stmpe_irq_ops, stmpe); 1224 1224 if (!stmpe->domain) { 1225 1225 dev_err(stmpe->dev, "Failed to create irqdomain\n"); 1226 1226 return -ENOSYS;
+3 -3
drivers/mfd/tc3589x.c
··· 234 234 235 235 static int tc3589x_irq_init(struct tc3589x *tc3589x, struct device_node *np) 236 236 { 237 - tc3589x->domain = irq_domain_add_simple( 238 - np, TC3589x_NR_INTERNAL_IRQS, 0, 239 - &tc3589x_irq_ops, tc3589x); 237 + tc3589x->domain = irq_domain_create_simple(of_fwnode_handle(np), 238 + TC3589x_NR_INTERNAL_IRQS, 0, 239 + &tc3589x_irq_ops, tc3589x); 240 240 241 241 if (!tc3589x->domain) { 242 242 dev_err(tc3589x->dev, "Failed to create irqdomain\n");
+1 -1
drivers/mfd/tps65217.c
··· 158 158 tps65217_set_bits(tps, TPS65217_REG_INT, TPS65217_INT_MASK, 159 159 TPS65217_INT_MASK, TPS65217_PROTECT_NONE); 160 160 161 - tps->irq_domain = irq_domain_add_linear(tps->dev->of_node, 161 + tps->irq_domain = irq_domain_create_linear(of_fwnode_handle(tps->dev->of_node), 162 162 TPS65217_NUM_IRQ, &tps65217_irq_domain_ops, tps); 163 163 if (!tps->irq_domain) { 164 164 dev_err(tps->dev, "Could not create IRQ domain\n");
+1 -1
drivers/mfd/tps6586x.c
··· 363 363 new_irq_base = 0; 364 364 } 365 365 366 - tps6586x->irq_domain = irq_domain_add_simple(tps6586x->dev->of_node, 366 + tps6586x->irq_domain = irq_domain_create_simple(of_fwnode_handle(tps6586x->dev->of_node), 367 367 irq_num, new_irq_base, &tps6586x_domain_ops, 368 368 tps6586x); 369 369 if (!tps6586x->irq_domain) {
+2 -2
drivers/mfd/twl4030-irq.c
··· 691 691 return irq_base; 692 692 } 693 693 694 - irq_domain_add_legacy(node, nr_irqs, irq_base, 0, 695 - &irq_domain_simple_ops, NULL); 694 + irq_domain_create_legacy(of_fwnode_handle(node), nr_irqs, irq_base, 0, 695 + &irq_domain_simple_ops, NULL); 696 696 697 697 irq_end = irq_base + TWL4030_CORE_NR_IRQS; 698 698
+2 -3
drivers/mfd/twl6030-irq.c
··· 364 364 365 365 int twl6030_init_irq(struct device *dev, int irq_num) 366 366 { 367 - struct device_node *node = dev->of_node; 368 367 int nr_irqs; 369 368 int status; 370 369 u8 mask[3]; ··· 411 412 twl6030_irq->irq_mapping_tbl = of_id->data; 412 413 413 414 twl6030_irq->irq_domain = 414 - irq_domain_add_linear(node, nr_irqs, 415 - &twl6030_irq_domain_ops, twl6030_irq); 415 + irq_domain_create_linear(of_fwnode_handle(dev->of_node), nr_irqs, 416 + &twl6030_irq_domain_ops, twl6030_irq); 416 417 if (!twl6030_irq->irq_domain) { 417 418 dev_err(dev, "Can't add irq_domain\n"); 418 419 return -ENOMEM;
+6 -9
drivers/mfd/wm831x-irq.c
··· 587 587 } 588 588 589 589 if (irq_base) 590 - domain = irq_domain_add_legacy(wm831x->dev->of_node, 591 - ARRAY_SIZE(wm831x_irqs), 592 - irq_base, 0, 593 - &wm831x_irq_domain_ops, 594 - wm831x); 590 + domain = irq_domain_create_legacy(of_fwnode_handle(wm831x->dev->of_node), 591 + ARRAY_SIZE(wm831x_irqs), irq_base, 0, 592 + &wm831x_irq_domain_ops, wm831x); 595 593 else 596 - domain = irq_domain_add_linear(wm831x->dev->of_node, 597 - ARRAY_SIZE(wm831x_irqs), 598 - &wm831x_irq_domain_ops, 599 - wm831x); 594 + domain = irq_domain_create_linear(of_fwnode_handle(wm831x->dev->of_node), 595 + ARRAY_SIZE(wm831x_irqs), &wm831x_irq_domain_ops, 596 + wm831x); 600 597 601 598 if (!domain) { 602 599 dev_warn(wm831x->dev, "Failed to allocate IRQ domain\n");
+1 -3
drivers/mfd/wm8994-irq.c
··· 213 213 return ret; 214 214 } 215 215 216 - wm8994->edge_irq = irq_domain_add_linear(NULL, 1, 217 - &wm8994_edge_irq_ops, 218 - wm8994); 216 + wm8994->edge_irq = irq_domain_create_linear(NULL, 1, &wm8994_edge_irq_ops, wm8994); 219 217 220 218 ret = regmap_add_irq_chip(wm8994->regmap, 221 219 irq_create_mapping(wm8994->edge_irq,
+3 -2
drivers/misc/hi6421v600-irq.c
··· 254 254 if (!priv->irqs) 255 255 return -ENOMEM; 256 256 257 - priv->domain = irq_domain_add_simple(np, PMIC_IRQ_LIST_MAX, 0, 258 - &hi6421v600_domain_ops, priv); 257 + priv->domain = irq_domain_create_simple(of_fwnode_handle(np), 258 + PMIC_IRQ_LIST_MAX, 0, 259 + &hi6421v600_domain_ops, priv); 259 260 if (!priv->domain) { 260 261 dev_err(dev, "Failed to create IRQ domain\n"); 261 262 return -ENODEV;
+3 -2
drivers/net/dsa/microchip/ksz_common.c
··· 2767 2767 kirq->dev = dev; 2768 2768 kirq->masked = ~0; 2769 2769 2770 - kirq->domain = irq_domain_add_simple(dev->dev->of_node, kirq->nirqs, 0, 2771 - &ksz_irq_domain_ops, kirq); 2770 + kirq->domain = irq_domain_create_simple(of_fwnode_handle(dev->dev->of_node), 2771 + kirq->nirqs, 0, 2772 + &ksz_irq_domain_ops, kirq); 2772 2773 if (!kirq->domain) 2773 2774 return -ENOMEM; 2774 2775
+2 -2
drivers/net/dsa/microchip/ksz_ptp.c
··· 1136 1136 1137 1137 init_completion(&port->tstamp_msg_comp); 1138 1138 1139 - ptpirq->domain = irq_domain_add_linear(dev->dev->of_node, ptpirq->nirqs, 1140 - &ksz_ptp_irq_domain_ops, ptpirq); 1139 + ptpirq->domain = irq_domain_create_linear(of_fwnode_handle(dev->dev->of_node), 1140 + ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq); 1141 1141 if (!ptpirq->domain) 1142 1142 return -ENOMEM; 1143 1143
+1 -1
drivers/net/dsa/mv88e6xxx/chip.c
··· 297 297 u16 reg, mask; 298 298 299 299 chip->g1_irq.nirqs = chip->info->g1_irqs; 300 - chip->g1_irq.domain = irq_domain_add_simple( 300 + chip->g1_irq.domain = irq_domain_create_simple( 301 301 NULL, chip->g1_irq.nirqs, 0, 302 302 &mv88e6xxx_g1_irq_domain_ops, chip); 303 303 if (!chip->g1_irq.domain)
+4 -2
drivers/net/dsa/mv88e6xxx/global2.c
··· 1154 1154 if (err) 1155 1155 return err; 1156 1156 1157 - chip->g2_irq.domain = irq_domain_add_simple( 1158 - chip->dev->of_node, 16, 0, &mv88e6xxx_g2_irq_domain_ops, chip); 1157 + chip->g2_irq.domain = irq_domain_create_simple(of_fwnode_handle(chip->dev->of_node), 1158 + 16, 0, 1159 + &mv88e6xxx_g2_irq_domain_ops, 1160 + chip); 1159 1161 if (!chip->g2_irq.domain) 1160 1162 return -ENOMEM; 1161 1163
+2 -2
drivers/net/dsa/qca/ar9331.c
··· 821 821 return ret; 822 822 } 823 823 824 - priv->irqdomain = irq_domain_add_linear(np, 1, &ar9331_sw_irqdomain_ops, 825 - priv); 824 + priv->irqdomain = irq_domain_create_linear(of_fwnode_handle(np), 1, 825 + &ar9331_sw_irqdomain_ops, priv); 826 826 if (!priv->irqdomain) { 827 827 dev_err(dev, "failed to create IRQ domain\n"); 828 828 return -EINVAL;
+2 -2
drivers/net/dsa/realtek/rtl8365mb.c
··· 1719 1719 goto out_put_node; 1720 1720 } 1721 1721 1722 - priv->irqdomain = irq_domain_add_linear(intc, priv->num_ports, 1723 - &rtl8365mb_irqdomain_ops, priv); 1722 + priv->irqdomain = irq_domain_create_linear(of_fwnode_handle(intc), priv->num_ports, 1723 + &rtl8365mb_irqdomain_ops, priv); 1724 1724 if (!priv->irqdomain) { 1725 1725 dev_err(priv->dev, "failed to add irq domain\n"); 1726 1726 ret = -ENOMEM;
+2 -4
drivers/net/dsa/realtek/rtl8366rb.c
··· 550 550 dev_err(priv->dev, "unable to request irq: %d\n", ret); 551 551 goto out_put_node; 552 552 } 553 - priv->irqdomain = irq_domain_add_linear(intc, 554 - RTL8366RB_NUM_INTERRUPT, 555 - &rtl8366rb_irqdomain_ops, 556 - priv); 553 + priv->irqdomain = irq_domain_create_linear(of_fwnode_handle(intc), RTL8366RB_NUM_INTERRUPT, 554 + &rtl8366rb_irqdomain_ops, priv); 557 555 if (!priv->irqdomain) { 558 556 dev_err(priv->dev, "failed to create IRQ domain\n"); 559 557 ret = -EINVAL;
+2 -2
drivers/net/ethernet/wangxun/txgbe/txgbe_irq.c
··· 184 184 goto skip_sp_irq; 185 185 186 186 txgbe->misc.nirqs = 1; 187 - txgbe->misc.domain = irq_domain_add_simple(NULL, txgbe->misc.nirqs, 0, 188 - &txgbe_misc_irq_domain_ops, txgbe); 187 + txgbe->misc.domain = irq_domain_create_simple(NULL, txgbe->misc.nirqs, 0, 188 + &txgbe_misc_irq_domain_ops, txgbe); 189 189 if (!txgbe->misc.domain) 190 190 return -ENOMEM; 191 191
+4 -5
drivers/net/usb/lan78xx.c
··· 2456 2456 2457 2457 static int lan78xx_setup_irq_domain(struct lan78xx_net *dev) 2458 2458 { 2459 - struct device_node *of_node; 2460 2459 struct irq_domain *irqdomain; 2461 2460 unsigned int irqmap = 0; 2462 2461 u32 buf; 2463 2462 int ret = 0; 2464 - 2465 - of_node = dev->udev->dev.parent->of_node; 2466 2463 2467 2464 mutex_init(&dev->domain_data.irq_lock); 2468 2465 ··· 2472 2475 dev->domain_data.irqchip = &lan78xx_irqchip; 2473 2476 dev->domain_data.irq_handler = handle_simple_irq; 2474 2477 2475 - irqdomain = irq_domain_add_simple(of_node, MAX_INT_EP, 0, 2476 - &chip_domain_ops, &dev->domain_data); 2478 + irqdomain = irq_domain_create_simple(of_fwnode_handle(dev->udev->dev.parent->of_node), 2479 + MAX_INT_EP, 0, 2480 + &chip_domain_ops, 2481 + &dev->domain_data); 2477 2482 if (irqdomain) { 2478 2483 /* create mapping for PHY interrupt */ 2479 2484 irqmap = irq_create_mapping(irqdomain, INT_EP_PHY);
+2 -2
drivers/pci/controller/dwc/pci-dra7xx.c
··· 359 359 360 360 irq_set_chained_handler_and_data(pp->irq, dra7xx_pcie_msi_irq_handler, 361 361 pp); 362 - dra7xx->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 363 - &intx_domain_ops, pp); 362 + dra7xx->irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 363 + PCI_NUM_INTX, &intx_domain_ops, pp); 364 364 of_node_put(pcie_intc_node); 365 365 if (!dra7xx->irq_domain) { 366 366 dev_err(dev, "Failed to get a INTx IRQ domain\n");
+1 -1
drivers/pci/controller/dwc/pci-keystone.c
··· 761 761 ks_pcie); 762 762 } 763 763 764 - intx_irq_domain = irq_domain_add_linear(intc_np, PCI_NUM_INTX, 764 + intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(intc_np), PCI_NUM_INTX, 765 765 &ks_pcie_intx_irq_domain_ops, NULL); 766 766 if (!intx_irq_domain) { 767 767 dev_err(dev, "Failed to add irq domain for INTX irqs\n");
+4 -4
drivers/pci/controller/dwc/pcie-amd-mdb.c
··· 290 290 return -ENODEV; 291 291 } 292 292 293 - pcie->mdb_domain = irq_domain_add_linear(pcie_intc_node, 32, 294 - &event_domain_ops, pcie); 293 + pcie->mdb_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 32, 294 + &event_domain_ops, pcie); 295 295 if (!pcie->mdb_domain) { 296 296 err = -ENOMEM; 297 297 dev_err(dev, "Failed to add MDB domain\n"); ··· 300 300 301 301 irq_domain_update_bus_token(pcie->mdb_domain, DOMAIN_BUS_NEXUS); 302 302 303 - pcie->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 304 - &amd_intx_domain_ops, pcie); 303 + pcie->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 304 + PCI_NUM_INTX, &amd_intx_domain_ops, pcie); 305 305 if (!pcie->intx_domain) { 306 306 err = -ENOMEM; 307 307 dev_err(dev, "Failed to add INTx domain\n");
+1 -1
drivers/pci/controller/dwc/pcie-designware-host.c
··· 227 227 int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) 228 228 { 229 229 struct dw_pcie *pci = to_dw_pcie_from_pp(pp); 230 - struct fwnode_handle *fwnode = of_node_to_fwnode(pci->dev->of_node); 230 + struct fwnode_handle *fwnode = of_fwnode_handle(pci->dev->of_node); 231 231 232 232 pp->irq_domain = irq_domain_create_linear(fwnode, pp->num_vectors, 233 233 &dw_pcie_msi_domain_ops, pp);
+2 -2
drivers/pci/controller/dwc/pcie-dw-rockchip.c
··· 144 144 return -EINVAL; 145 145 } 146 146 147 - rockchip->irq_domain = irq_domain_add_linear(intc, PCI_NUM_INTX, 148 - &intx_domain_ops, rockchip); 147 + rockchip->irq_domain = irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM_INTX, 148 + &intx_domain_ops, rockchip); 149 149 of_node_put(intc); 150 150 if (!rockchip->irq_domain) { 151 151 dev_err(dev, "failed to get a INTx IRQ domain\n");
+1 -1
drivers/pci/controller/dwc/pcie-uniphier.c
··· 279 279 goto out_put_node; 280 280 } 281 281 282 - pcie->intx_irq_domain = irq_domain_add_linear(np_intc, PCI_NUM_INTX, 282 + pcie->intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(np_intc), PCI_NUM_INTX, 283 283 &uniphier_intx_domain_ops, pp); 284 284 if (!pcie->intx_irq_domain) { 285 285 dev_err(pci->dev, "Failed to get INTx domain\n");
+5 -6
drivers/pci/controller/mobiveil/pcie-mobiveil-host.c
··· 435 435 static int mobiveil_allocate_msi_domains(struct mobiveil_pcie *pcie) 436 436 { 437 437 struct device *dev = &pcie->pdev->dev; 438 - struct fwnode_handle *fwnode = of_node_to_fwnode(dev->of_node); 438 + struct fwnode_handle *fwnode = of_fwnode_handle(dev->of_node); 439 439 struct mobiveil_msi *msi = &pcie->rp.msi; 440 440 441 441 mutex_init(&msi->lock); 442 - msi->dev_domain = irq_domain_add_linear(NULL, msi->num_of_vectors, 443 - &msi_domain_ops, pcie); 442 + msi->dev_domain = irq_domain_create_linear(NULL, msi->num_of_vectors, 443 + &msi_domain_ops, pcie); 444 444 if (!msi->dev_domain) { 445 445 dev_err(dev, "failed to create IRQ domain\n"); 446 446 return -ENOMEM; ··· 461 461 static int mobiveil_pcie_init_irq_domain(struct mobiveil_pcie *pcie) 462 462 { 463 463 struct device *dev = &pcie->pdev->dev; 464 - struct device_node *node = dev->of_node; 465 464 struct mobiveil_root_port *rp = &pcie->rp; 466 465 467 466 /* setup INTx */ 468 - rp->intx_domain = irq_domain_add_linear(node, PCI_NUM_INTX, 469 - &intx_domain_ops, pcie); 467 + rp->intx_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), PCI_NUM_INTX, 468 + &intx_domain_ops, pcie); 470 469 471 470 if (!rp->intx_domain) { 472 471 dev_err(dev, "Failed to get a INTx IRQ domain\n");
+5 -9
drivers/pci/controller/pci-aardvark.c
··· 1456 1456 raw_spin_lock_init(&pcie->msi_irq_lock); 1457 1457 mutex_init(&pcie->msi_used_lock); 1458 1458 1459 - pcie->msi_inner_domain = 1460 - irq_domain_add_linear(NULL, MSI_IRQ_NUM, 1461 - &advk_msi_domain_ops, pcie); 1459 + pcie->msi_inner_domain = irq_domain_create_linear(NULL, MSI_IRQ_NUM, 1460 + &advk_msi_domain_ops, pcie); 1462 1461 if (!pcie->msi_inner_domain) 1463 1462 return -ENOMEM; 1464 1463 ··· 1507 1508 irq_chip->irq_mask = advk_pcie_irq_mask; 1508 1509 irq_chip->irq_unmask = advk_pcie_irq_unmask; 1509 1510 1510 - pcie->irq_domain = 1511 - irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 1512 - &advk_pcie_irq_domain_ops, pcie); 1511 + pcie->irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX, 1512 + &advk_pcie_irq_domain_ops, pcie); 1513 1513 if (!pcie->irq_domain) { 1514 1514 dev_err(dev, "Failed to get a INTx IRQ domain\n"); 1515 1515 ret = -ENOMEM; ··· 1547 1549 1548 1550 static int advk_pcie_init_rp_irq_domain(struct advk_pcie *pcie) 1549 1551 { 1550 - pcie->rp_irq_domain = irq_domain_add_linear(NULL, 1, 1551 - &advk_pcie_rp_irq_domain_ops, 1552 - pcie); 1552 + pcie->rp_irq_domain = irq_domain_create_linear(NULL, 1, &advk_pcie_rp_irq_domain_ops, pcie); 1553 1553 if (!pcie->rp_irq_domain) { 1554 1554 dev_err(&pcie->pdev->dev, "Failed to add Root Port IRQ domain\n"); 1555 1555 return -ENOMEM;
+2 -2
drivers/pci/controller/pci-ftpci100.c
··· 345 345 return irq ?: -EINVAL; 346 346 } 347 347 348 - p->irqdomain = irq_domain_add_linear(intc, PCI_NUM_INTX, 349 - &faraday_pci_irqdomain_ops, p); 348 + p->irqdomain = irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM_INTX, 349 + &faraday_pci_irqdomain_ops, p); 350 350 of_node_put(intc); 351 351 if (!p->irqdomain) { 352 352 dev_err(p->dev, "failed to create Gemini PCI IRQ domain\n");
+3 -3
drivers/pci/controller/pci-mvebu.c
··· 1078 1078 return -ENODEV; 1079 1079 } 1080 1080 1081 - port->intx_irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 1082 - &mvebu_pcie_intx_irq_domain_ops, 1083 - port); 1081 + port->intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 1082 + PCI_NUM_INTX, 1083 + &mvebu_pcie_intx_irq_domain_ops, port); 1084 1084 of_node_put(pcie_intc_node); 1085 1085 if (!port->intx_irq_domain) { 1086 1086 dev_err(dev, "Failed to get INTx IRQ domain for %s\n", port->name);
+1 -1
drivers/pci/controller/pci-xgene-msi.c
··· 247 247 if (!msi->inner_domain) 248 248 return -ENOMEM; 249 249 250 - msi->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(msi->node), 250 + msi->msi_domain = pci_msi_create_irq_domain(of_fwnode_handle(msi->node), 251 251 &xgene_msi_domain_info, 252 252 msi->inner_domain); 253 253
+2 -2
drivers/pci/controller/pcie-altera-msi.c
··· 164 164 165 165 static int altera_allocate_domains(struct altera_msi *msi) 166 166 { 167 - struct fwnode_handle *fwnode = of_node_to_fwnode(msi->pdev->dev.of_node); 167 + struct fwnode_handle *fwnode = of_fwnode_handle(msi->pdev->dev.of_node); 168 168 169 - msi->inner_domain = irq_domain_add_linear(NULL, msi->num_of_vectors, 169 + msi->inner_domain = irq_domain_create_linear(NULL, msi->num_of_vectors, 170 170 &msi_domain_ops, msi); 171 171 if (!msi->inner_domain) { 172 172 dev_err(&msi->pdev->dev, "failed to create IRQ domain\n");
+1 -1
drivers/pci/controller/pcie-altera.c
··· 855 855 struct device_node *node = dev->of_node; 856 856 857 857 /* Setup INTx */ 858 - pcie->irq_domain = irq_domain_add_linear(node, PCI_NUM_INTX, 858 + pcie->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), PCI_NUM_INTX, 859 859 &intx_domain_ops, pcie); 860 860 if (!pcie->irq_domain) { 861 861 dev_err(dev, "Failed to get a INTx IRQ domain\n");
+2 -2
drivers/pci/controller/pcie-brcmstb.c
··· 581 581 582 582 static int brcm_allocate_domains(struct brcm_msi *msi) 583 583 { 584 - struct fwnode_handle *fwnode = of_node_to_fwnode(msi->np); 584 + struct fwnode_handle *fwnode = of_fwnode_handle(msi->np); 585 585 struct device *dev = msi->dev; 586 586 587 - msi->inner_domain = irq_domain_add_linear(NULL, msi->nr, &msi_domain_ops, msi); 587 + msi->inner_domain = irq_domain_create_linear(NULL, msi->nr, &msi_domain_ops, msi); 588 588 if (!msi->inner_domain) { 589 589 dev_err(dev, "failed to create IRQ domain\n"); 590 590 return -ENOMEM;
+3 -3
drivers/pci/controller/pcie-iproc-msi.c
··· 446 446 static int iproc_msi_alloc_domains(struct device_node *node, 447 447 struct iproc_msi *msi) 448 448 { 449 - msi->inner_domain = irq_domain_add_linear(NULL, msi->nr_msi_vecs, 450 - &msi_domain_ops, msi); 449 + msi->inner_domain = irq_domain_create_linear(NULL, msi->nr_msi_vecs, 450 + &msi_domain_ops, msi); 451 451 if (!msi->inner_domain) 452 452 return -ENOMEM; 453 453 454 - msi->msi_domain = pci_msi_create_irq_domain(of_node_to_fwnode(node), 454 + msi->msi_domain = pci_msi_create_irq_domain(of_fwnode_handle(node), 455 455 &iproc_msi_domain_info, 456 456 msi->inner_domain); 457 457 if (!msi->msi_domain) {
+5 -4
drivers/pci/controller/pcie-mediatek-gen3.c
··· 745 745 return -ENODEV; 746 746 } 747 747 748 - pcie->intx_domain = irq_domain_add_linear(intc_node, PCI_NUM_INTX, 749 - &intx_domain_ops, pcie); 748 + pcie->intx_domain = irq_domain_create_linear(of_fwnode_handle(intc_node), PCI_NUM_INTX, 749 + &intx_domain_ops, pcie); 750 750 if (!pcie->intx_domain) { 751 751 dev_err(dev, "failed to create INTx IRQ domain\n"); 752 752 ret = -ENODEV; ··· 756 756 /* Setup MSI */ 757 757 mutex_init(&pcie->lock); 758 758 759 - pcie->msi_bottom_domain = irq_domain_add_linear(node, PCIE_MSI_IRQS_NUM, 760 - &mtk_msi_bottom_domain_ops, pcie); 759 + pcie->msi_bottom_domain = irq_domain_create_linear(of_fwnode_handle(node), 760 + PCIE_MSI_IRQS_NUM, 761 + &mtk_msi_bottom_domain_ops, pcie); 761 762 if (!pcie->msi_bottom_domain) { 762 763 dev_err(dev, "failed to create MSI bottom domain\n"); 763 764 ret = -ENODEV;
+3 -3
drivers/pci/controller/pcie-mediatek.c
··· 485 485 486 486 static int mtk_pcie_allocate_msi_domains(struct mtk_pcie_port *port) 487 487 { 488 - struct fwnode_handle *fwnode = of_node_to_fwnode(port->pcie->dev->of_node); 488 + struct fwnode_handle *fwnode = of_fwnode_handle(port->pcie->dev->of_node); 489 489 490 490 mutex_init(&port->lock); 491 491 ··· 569 569 return -ENODEV; 570 570 } 571 571 572 - port->irq_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 573 - &intx_domain_ops, port); 572 + port->irq_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX, 573 + &intx_domain_ops, port); 574 574 of_node_put(pcie_intc_node); 575 575 if (!port->irq_domain) { 576 576 dev_err(dev, "failed to get INTx IRQ domain\n");
+2 -2
drivers/pci/controller/pcie-rockchip-host.c
··· 693 693 return -EINVAL; 694 694 } 695 695 696 - rockchip->irq_domain = irq_domain_add_linear(intc, PCI_NUM_INTX, 697 - &intx_domain_ops, rockchip); 696 + rockchip->irq_domain = irq_domain_create_linear(of_fwnode_handle(intc), PCI_NUM_INTX, 697 + &intx_domain_ops, rockchip); 698 698 of_node_put(intc); 699 699 if (!rockchip->irq_domain) { 700 700 dev_err(dev, "failed to get a INTx IRQ domain\n");
+4 -6
drivers/pci/controller/pcie-xilinx-cpm.c
··· 395 395 return -EINVAL; 396 396 } 397 397 398 - port->cpm_domain = irq_domain_add_linear(pcie_intc_node, 32, 399 - &event_domain_ops, 400 - port); 398 + port->cpm_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 32, 399 + &event_domain_ops, port); 401 400 if (!port->cpm_domain) 402 401 goto out; 403 402 404 403 irq_domain_update_bus_token(port->cpm_domain, DOMAIN_BUS_NEXUS); 405 404 406 - port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 407 - &intx_domain_ops, 408 - port); 405 + port->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX, 406 + &intx_domain_ops, port); 409 407 if (!port->intx_domain) 410 408 goto out; 411 409
+7 -7
drivers/pci/controller/pcie-xilinx-dma-pl.c
··· 470 470 struct device *dev = port->dev; 471 471 struct xilinx_msi *msi = &port->msi; 472 472 int size = BITS_TO_LONGS(XILINX_NUM_MSI_IRQS) * sizeof(long); 473 - struct fwnode_handle *fwnode = of_node_to_fwnode(port->dev->of_node); 473 + struct fwnode_handle *fwnode = of_fwnode_handle(port->dev->of_node); 474 474 475 - msi->dev_domain = irq_domain_add_linear(NULL, XILINX_NUM_MSI_IRQS, 476 - &dev_msi_domain_ops, port); 475 + msi->dev_domain = irq_domain_create_linear(NULL, XILINX_NUM_MSI_IRQS, 476 + &dev_msi_domain_ops, port); 477 477 if (!msi->dev_domain) 478 478 goto out; 479 479 ··· 585 585 return -EINVAL; 586 586 } 587 587 588 - port->pldma_domain = irq_domain_add_linear(pcie_intc_node, 32, 589 - &event_domain_ops, port); 588 + port->pldma_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 32, 589 + &event_domain_ops, port); 590 590 if (!port->pldma_domain) 591 591 return -ENOMEM; 592 592 593 593 irq_domain_update_bus_token(port->pldma_domain, DOMAIN_BUS_NEXUS); 594 594 595 - port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 596 - &intx_domain_ops, port); 595 + port->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX, 596 + &intx_domain_ops, port); 597 597 if (!port->intx_domain) { 598 598 dev_err(dev, "Failed to get a INTx IRQ domain\n"); 599 599 return -ENOMEM;
+4 -7
drivers/pci/controller/pcie-xilinx-nwl.c
··· 495 495 { 496 496 #ifdef CONFIG_PCI_MSI 497 497 struct device *dev = pcie->dev; 498 - struct fwnode_handle *fwnode = of_node_to_fwnode(dev->of_node); 498 + struct fwnode_handle *fwnode = of_fwnode_handle(dev->of_node); 499 499 struct nwl_msi *msi = &pcie->msi; 500 500 501 - msi->dev_domain = irq_domain_add_linear(NULL, INT_PCI_MSI_NR, 502 - &dev_msi_domain_ops, pcie); 501 + msi->dev_domain = irq_domain_create_linear(NULL, INT_PCI_MSI_NR, &dev_msi_domain_ops, pcie); 503 502 if (!msi->dev_domain) { 504 503 dev_err(dev, "failed to create dev IRQ domain\n"); 505 504 return -ENOMEM; ··· 581 582 return -EINVAL; 582 583 } 583 584 584 - pcie->intx_irq_domain = irq_domain_add_linear(intc_node, 585 - PCI_NUM_INTX, 586 - &intx_domain_ops, 587 - pcie); 585 + pcie->intx_irq_domain = irq_domain_create_linear(of_fwnode_handle(intc_node), PCI_NUM_INTX, 586 + &intx_domain_ops, pcie); 588 587 of_node_put(intc_node); 589 588 if (!pcie->intx_irq_domain) { 590 589 dev_err(dev, "failed to create IRQ domain\n");
+2 -3
drivers/pci/controller/pcie-xilinx.c
··· 461 461 return -ENODEV; 462 462 } 463 463 464 - pcie->leg_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 465 - &intx_domain_ops, 466 - pcie); 464 + pcie->leg_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX, 465 + &intx_domain_ops, pcie); 467 466 of_node_put(pcie_intc_node); 468 467 if (!pcie->leg_domain) { 469 468 dev_err(dev, "Failed to get a INTx IRQ domain\n");
+7 -9
drivers/pci/controller/plda/pcie-plda-host.c
··· 150 150 static int plda_allocate_msi_domains(struct plda_pcie_rp *port) 151 151 { 152 152 struct device *dev = port->dev; 153 - struct fwnode_handle *fwnode = of_node_to_fwnode(dev->of_node); 153 + struct fwnode_handle *fwnode = of_fwnode_handle(dev->of_node); 154 154 struct plda_msi *msi = &port->msi; 155 155 156 156 mutex_init(&port->msi.lock); 157 157 158 - msi->dev_domain = irq_domain_add_linear(NULL, msi->num_vectors, 159 - &msi_domain_ops, port); 158 + msi->dev_domain = irq_domain_create_linear(NULL, msi->num_vectors, &msi_domain_ops, port); 160 159 if (!msi->dev_domain) { 161 160 dev_err(dev, "failed to create IRQ domain\n"); 162 161 return -ENOMEM; ··· 392 393 return -EINVAL; 393 394 } 394 395 395 - port->event_domain = irq_domain_add_linear(pcie_intc_node, 396 - port->num_events, 397 - &plda_event_domain_ops, 398 - port); 396 + port->event_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), 397 + port->num_events, &plda_event_domain_ops, 398 + port); 399 399 if (!port->event_domain) { 400 400 dev_err(dev, "failed to get event domain\n"); 401 401 of_node_put(pcie_intc_node); ··· 403 405 404 406 irq_domain_update_bus_token(port->event_domain, DOMAIN_BUS_NEXUS); 405 407 406 - port->intx_domain = irq_domain_add_linear(pcie_intc_node, PCI_NUM_INTX, 407 - &intx_domain_ops, port); 408 + port->intx_domain = irq_domain_create_linear(of_fwnode_handle(pcie_intc_node), PCI_NUM_INTX, 409 + &intx_domain_ops, port); 408 410 if (!port->intx_domain) { 409 411 dev_err(dev, "failed to get an INTx IRQ domain\n"); 410 412 of_node_put(pcie_intc_node);
+2 -3
drivers/pinctrl/mediatek/mtk-eint.c
··· 565 565 goto err_eint; 566 566 } 567 567 568 - eint->domain = irq_domain_add_linear(eint->dev->of_node, 569 - eint->hw->ap_num, 570 - &irq_domain_simple_ops, NULL); 568 + eint->domain = irq_domain_create_linear(of_fwnode_handle(eint->dev->of_node), 569 + eint->hw->ap_num, &irq_domain_simple_ops, NULL); 571 570 if (!eint->domain) 572 571 goto err_eint; 573 572
+1 -1
drivers/pinctrl/pinctrl-at91-pio4.c
··· 1206 1206 dev_dbg(dev, "bank %i: irq=%d\n", i, ret); 1207 1207 } 1208 1208 1209 - atmel_pioctrl->irq_domain = irq_domain_add_linear(dev->of_node, 1209 + atmel_pioctrl->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), 1210 1210 atmel_pioctrl->gpio_chip->ngpio, 1211 1211 &irq_domain_simple_ops, NULL); 1212 1212 if (!atmel_pioctrl->irq_domain)
+1 -1
drivers/pinctrl/pinctrl-keembay.c
··· 1268 1268 for_each_set_clump8(bit, clump, &reg, BITS_PER_TYPE(typeof(reg))) { 1269 1269 pin = clump & ~KEEMBAY_GPIO_IRQ_ENABLE; 1270 1270 val = keembay_read_pin(kpc->base0 + KEEMBAY_GPIO_DATA_IN, pin); 1271 - kmb_irq = irq_linear_revmap(gc->irq.domain, pin); 1271 + kmb_irq = irq_find_mapping(gc->irq.domain, pin); 1272 1272 1273 1273 /* Checks if the interrupt is enabled */ 1274 1274 if (val && (clump & KEEMBAY_GPIO_IRQ_ENABLE))
+5 -4
drivers/pinctrl/pinctrl-single.c
··· 1611 1611 1612 1612 /* 1613 1613 * We can use the register offset as the hardirq 1614 - * number as irq_domain_add_simple maps them lazily. 1614 + * number as irq_domain_create_simple maps them lazily. 1615 1615 * This way we can easily support more than one 1616 1616 * interrupt per function if needed. 1617 1617 */ 1618 1618 num_irqs = pcs->size; 1619 1619 1620 - pcs->domain = irq_domain_add_simple(np, num_irqs, 0, 1621 - &pcs_irqdomain_ops, 1622 - pcs_soc); 1620 + pcs->domain = irq_domain_create_simple(of_fwnode_handle(np), 1621 + num_irqs, 0, 1622 + &pcs_irqdomain_ops, 1623 + pcs_soc); 1623 1624 if (!pcs->domain) { 1624 1625 irq_set_chained_handler(pcs_soc->irq, NULL); 1625 1626 return -EINVAL;
+3 -4
drivers/pinctrl/sunxi/pinctrl-sunxi.c
··· 1646 1646 } 1647 1647 } 1648 1648 1649 - pctl->domain = irq_domain_add_linear(node, 1650 - pctl->desc->irq_banks * IRQ_PER_BANK, 1651 - &sunxi_pinctrl_irq_domain_ops, 1652 - pctl); 1649 + pctl->domain = irq_domain_create_linear(of_fwnode_handle(node), 1650 + pctl->desc->irq_banks * IRQ_PER_BANK, 1651 + &sunxi_pinctrl_irq_domain_ops, pctl); 1653 1652 if (!pctl->domain) { 1654 1653 dev_err(&pdev->dev, "Couldn't register IRQ domain\n"); 1655 1654 ret = -ENOMEM;
+2 -3
drivers/sh/intc/irqdomain.c
··· 59 59 * tree penalty for linear cases with non-zero hwirq bases. 60 60 */ 61 61 if (irq_base == 0 && irq_end == (irq_base + hw->nr_vectors - 1)) 62 - d->domain = irq_domain_add_linear(NULL, hw->nr_vectors, 63 - &intc_evt_ops, NULL); 62 + d->domain = irq_domain_create_linear(NULL, hw->nr_vectors, &intc_evt_ops, NULL); 64 63 else 65 - d->domain = irq_domain_add_tree(NULL, &intc_evt_ops, NULL); 64 + d->domain = irq_domain_create_tree(NULL, &intc_evt_ops, NULL); 66 65 67 66 BUG_ON(!d->domain); 68 67 }
+2 -2
drivers/soc/dove/pmu.c
··· 273 273 writel(0, pmu->pmc_base + PMC_IRQ_MASK); 274 274 writel(0, pmu->pmc_base + PMC_IRQ_CAUSE); 275 275 276 - domain = irq_domain_add_linear(pmu->of_node, NR_PMU_IRQS, 277 - &irq_generic_chip_ops, NULL); 276 + domain = irq_domain_create_linear(of_fwnode_handle(pmu->of_node), NR_PMU_IRQS, 277 + &irq_generic_chip_ops, NULL); 278 278 if (!domain) { 279 279 pr_err("%s: unable to add irq domain\n", name); 280 280 return -ENOMEM;
+2 -2
drivers/soc/fsl/qe/qe_ic.c
··· 446 446 high_handler = NULL; 447 447 } 448 448 449 - qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS, 450 - &qe_ic_host_ops, qe_ic); 449 + qe_ic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), NR_QE_IC_INTS, 450 + &qe_ic_host_ops, qe_ic); 451 451 if (qe_ic->irqhost == NULL) { 452 452 dev_err(dev, "failed to add irq domain\n"); 453 453 return -ENODEV;
+1 -1
drivers/soc/qcom/smp2p.c
··· 399 399 struct smp2p_entry *entry, 400 400 struct device_node *node) 401 401 { 402 - entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry); 402 + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry); 403 403 if (!entry->domain) { 404 404 dev_err(smp2p->dev, "failed to add irq_domain\n"); 405 405 return -ENOMEM;
+1 -1
drivers/soc/qcom/smsm.c
··· 456 456 return ret; 457 457 } 458 458 459 - entry->domain = irq_domain_add_linear(node, 32, &smsm_irq_ops, entry); 459 + entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smsm_irq_ops, entry); 460 460 if (!entry->domain) { 461 461 dev_err(smsm->dev, "failed to add irq_domain\n"); 462 462 return -ENOMEM;
+3 -2
drivers/soc/tegra/pmc.c
··· 2500 2500 pmc->irq.irq_set_type = pmc->soc->irq_set_type; 2501 2501 pmc->irq.irq_set_wake = pmc->soc->irq_set_wake; 2502 2502 2503 - pmc->domain = irq_domain_add_hierarchy(parent, 0, 96, pmc->dev->of_node, 2504 - &tegra_pmc_irq_domain_ops, pmc); 2503 + pmc->domain = irq_domain_create_hierarchy(parent, 0, 96, 2504 + of_fwnode_handle(pmc->dev->of_node), 2505 + &tegra_pmc_irq_domain_ops, pmc); 2505 2506 if (!pmc->domain) { 2506 2507 dev_err(pmc->dev, "failed to allocate domain\n"); 2507 2508 return -ENOMEM;
+2 -1
drivers/thermal/qcom/lmh.c
··· 209 209 } 210 210 211 211 lmh_data->irq = platform_get_irq(pdev, 0); 212 - lmh_data->domain = irq_domain_add_linear(np, 1, &lmh_irq_ops, lmh_data); 212 + lmh_data->domain = irq_domain_create_linear(of_fwnode_handle(np), 1, &lmh_irq_ops, 213 + lmh_data); 213 214 if (!lmh_data->domain) { 214 215 dev_err(dev, "Error adding irq_domain\n"); 215 216 return -EINVAL;
+1 -1
drivers/thermal/tegra/soctherm.c
··· 1234 1234 soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type; 1235 1235 soc_irq_cdata.irq_chip.irq_set_wake = NULL; 1236 1236 1237 - soc_irq_cdata.domain = irq_domain_add_linear(np, num_irqs, 1237 + soc_irq_cdata.domain = irq_domain_create_linear(of_fwnode_handle(np), num_irqs, 1238 1238 &soctherm_oc_domain_ops, 1239 1239 &soc_irq_cdata); 1240 1240
+3 -2
include/linux/gpio/driver.h
··· 287 287 /** 288 288 * @first: 289 289 * 290 - * Required for static IRQ allocation. If set, irq_domain_add_simple() 291 - * will allocate and map all IRQs during initialization. 290 + * Required for static IRQ allocation. If set, 291 + * irq_domain_create_simple() will allocate and map all IRQs 292 + * during initialization. 292 293 */ 293 294 unsigned int first; 294 295
+219 -245
include/linux/irqdomain.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 - * irq_domain - IRQ translation domains 3 + * irq_domain - IRQ Translation Domains 4 4 * 5 - * Translation infrastructure between hw and linux irq numbers. This is 6 - * helpful for interrupt controllers to implement mapping between hardware 7 - * irq numbers and the Linux irq number space. 8 - * 9 - * irq_domains also have hooks for translating device tree or other 10 - * firmware interrupt representations into a hardware irq number that 11 - * can be mapped back to a Linux irq number without any extra platform 12 - * support code. 13 - * 14 - * Interrupt controller "domain" data structure. This could be defined as a 15 - * irq domain controller. That is, it handles the mapping between hardware 16 - * and virtual interrupt numbers for a given interrupt domain. The domain 17 - * structure is generally created by the PIC code for a given PIC instance 18 - * (though a domain can cover more than one PIC if they have a flat number 19 - * model). It's the domain callbacks that are responsible for setting the 20 - * irq_chip on a given irq_desc after it's been mapped. 21 - * 22 - * The host code and data structures use a fwnode_handle pointer to 23 - * identify the domain. In some cases, and in order to preserve source 24 - * code compatibility, this fwnode pointer is "upgraded" to a DT 25 - * device_node. For those firmware infrastructures that do not provide 26 - * a unique identifier for an interrupt controller, the irq_domain 27 - * code offers a fwnode allocator. 5 + * See Documentation/core-api/irq/irq-domain.rst for the details. 28 6 */ 29 7 30 8 #ifndef _LINUX_IRQDOMAIN_H ··· 39 61 * pass a device-specific description of an interrupt. 40 62 */ 41 63 struct irq_fwspec { 42 - struct fwnode_handle *fwnode; 43 - int param_count; 44 - u32 param[IRQ_DOMAIN_IRQ_SPEC_PARAMS]; 64 + struct fwnode_handle *fwnode; 65 + int param_count; 66 + u32 param[IRQ_DOMAIN_IRQ_SPEC_PARAMS]; 45 67 }; 46 68 47 69 /* Conversion function from of_phandle_args fields to fwspec */ ··· 50 72 51 73 /** 52 74 * struct irq_domain_ops - Methods for irq_domain objects 53 - * @match: Match an interrupt controller device node to a domain, returns 54 - * 1 on a match 55 - * @select: Match an interrupt controller fw specification. It is more generic 56 - * than @match as it receives a complete struct irq_fwspec. Therefore, 57 - * @select is preferred if provided. Returns 1 on a match. 58 - * @map: Create or update a mapping between a virtual irq number and a hw 59 - * irq number. This is called only once for a given mapping. 60 - * @unmap: Dispose of such a mapping 61 - * @xlate: Given a device tree node and interrupt specifier, decode 62 - * the hardware irq number and linux irq type value. 63 - * @alloc: Allocate @nr_irqs interrupts starting from @virq. 64 - * @free: Free @nr_irqs interrupts starting from @virq. 65 - * @activate: Activate one interrupt in HW (@irqd). If @reserve is set, only 66 - * reserve the vector. If unset, assign the vector (called from 67 - * request_irq()). 68 - * @deactivate: Disarm one interrupt (@irqd). 69 - * @translate: Given @fwspec, decode the hardware irq number (@out_hwirq) and 70 - * linux irq type value (@out_type). This is a generalised @xlate 71 - * (over struct irq_fwspec) and is preferred if provided. 72 - * @debug_show: For domains to show specific data for an interrupt in debugfs. 75 + * @match: Match an interrupt controller device node to a domain, returns 76 + * 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. 80 + * @map: Create or update a mapping between a virtual irq number and a hw 81 + * irq number. This is called only once for a given mapping. 82 + * @unmap: Dispose of such a mapping 83 + * @xlate: Given a device tree node and interrupt specifier, decode 84 + * 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. 73 95 * 74 96 * Functions below are provided by the driver and called whenever a new mapping 75 97 * is created or an old mapping is disposed. The driver can then proceed to ··· 77 99 * to setup the irq_desc when returning from map(). 78 100 */ 79 101 struct irq_domain_ops { 80 - int (*match)(struct irq_domain *d, struct device_node *node, 81 - enum irq_domain_bus_token bus_token); 82 - int (*select)(struct irq_domain *d, struct irq_fwspec *fwspec, 83 - enum irq_domain_bus_token bus_token); 84 - int (*map)(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw); 85 - void (*unmap)(struct irq_domain *d, unsigned int virq); 86 - int (*xlate)(struct irq_domain *d, struct device_node *node, 87 - const u32 *intspec, unsigned int intsize, 88 - unsigned long *out_hwirq, unsigned int *out_type); 102 + int (*match)(struct irq_domain *d, struct device_node *node, 103 + enum irq_domain_bus_token bus_token); 104 + int (*select)(struct irq_domain *d, struct irq_fwspec *fwspec, 105 + enum irq_domain_bus_token bus_token); 106 + int (*map)(struct irq_domain *d, unsigned int virq, irq_hw_number_t hw); 107 + void (*unmap)(struct irq_domain *d, unsigned int virq); 108 + int (*xlate)(struct irq_domain *d, struct device_node *node, 109 + const u32 *intspec, unsigned int intsize, 110 + unsigned long *out_hwirq, unsigned int *out_type); 89 111 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 90 112 /* extended V2 interfaces to support hierarchy irq_domains */ 91 - int (*alloc)(struct irq_domain *d, unsigned int virq, 92 - unsigned int nr_irqs, void *arg); 93 - void (*free)(struct irq_domain *d, unsigned int virq, 94 - unsigned int nr_irqs); 95 - int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve); 96 - void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data); 97 - int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec, 98 - unsigned long *out_hwirq, unsigned int *out_type); 113 + int (*alloc)(struct irq_domain *d, unsigned int virq, 114 + unsigned int nr_irqs, void *arg); 115 + void (*free)(struct irq_domain *d, unsigned int virq, 116 + unsigned int nr_irqs); 117 + int (*activate)(struct irq_domain *d, struct irq_data *irqd, bool reserve); 118 + void (*deactivate)(struct irq_domain *d, struct irq_data *irq_data); 119 + int (*translate)(struct irq_domain *d, struct irq_fwspec *fwspec, 120 + unsigned long *out_hwirq, unsigned int *out_type); 99 121 #endif 100 122 #ifdef CONFIG_GENERIC_IRQ_DEBUGFS 101 - void (*debug_show)(struct seq_file *m, struct irq_domain *d, 102 - struct irq_data *irqd, int ind); 123 + void (*debug_show)(struct seq_file *m, struct irq_domain *d, 124 + struct irq_data *irqd, int ind); 103 125 #endif 104 126 }; 105 127 ··· 222 244 return to_of_node(d->fwnode); 223 245 } 224 246 225 - static inline void irq_domain_set_pm_device(struct irq_domain *d, 226 - struct device *dev) 247 + static inline void irq_domain_set_pm_device(struct irq_domain *d, struct device *dev) 227 248 { 228 249 if (d) 229 250 d->pm_dev = dev; ··· 238 261 IRQCHIP_FWNODE_NAMED_ID, 239 262 }; 240 263 241 - static inline 242 - struct fwnode_handle *irq_domain_alloc_named_fwnode(const char *name) 264 + static inline struct fwnode_handle *irq_domain_alloc_named_fwnode(const char *name) 243 265 { 244 266 return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED, 0, name, NULL); 245 267 } 246 268 247 - static inline 248 - struct fwnode_handle *irq_domain_alloc_named_id_fwnode(const char *name, int id) 269 + static inline struct fwnode_handle *irq_domain_alloc_named_id_fwnode(const char *name, int id) 249 270 { 250 271 return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED_ID, id, name, 251 272 NULL); ··· 308 333 struct irq_domain *devm_irq_domain_instantiate(struct device *dev, 309 334 const struct irq_domain_info *info); 310 335 311 - struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, 312 - unsigned int size, 336 + struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode, unsigned int size, 313 337 unsigned int first_irq, 314 - const struct irq_domain_ops *ops, 315 - void *host_data); 316 - struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, 317 - unsigned int size, 318 - unsigned int first_irq, 319 - irq_hw_number_t first_hwirq, 320 - const struct irq_domain_ops *ops, 321 - void *host_data); 322 - struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, 323 - unsigned int size, 324 - unsigned int first_irq, 325 - irq_hw_number_t first_hwirq, 326 - const struct irq_domain_ops *ops, 327 - void *host_data); 338 + const struct irq_domain_ops *ops, void *host_data); 339 + struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, unsigned int size, 340 + unsigned int first_irq, irq_hw_number_t first_hwirq, 341 + const struct irq_domain_ops *ops, void *host_data); 328 342 struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, 329 343 enum irq_domain_bus_token bus_token); 330 344 void irq_set_default_domain(struct irq_domain *domain); 331 345 struct irq_domain *irq_get_default_domain(void); 332 - int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, 333 - irq_hw_number_t hwirq, int node, 346 + int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, irq_hw_number_t hwirq, int node, 334 347 const struct irq_affinity_desc *affinity); 335 - 336 - static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) 337 - { 338 - return node ? &node->fwnode : NULL; 339 - } 340 348 341 349 extern const struct fwnode_operations irqchip_fwnode_ops; 342 350 ··· 328 370 return fwnode && fwnode->ops == &irqchip_fwnode_ops; 329 371 } 330 372 331 - void irq_domain_update_bus_token(struct irq_domain *domain, 332 - enum irq_domain_bus_token bus_token); 373 + void irq_domain_update_bus_token(struct irq_domain *domain, enum irq_domain_bus_token bus_token); 333 374 334 - static inline 335 - struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode, 336 - enum irq_domain_bus_token bus_token) 375 + static inline struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode, 376 + enum irq_domain_bus_token bus_token) 337 377 { 338 378 struct irq_fwspec fwspec = { 339 379 .fwnode = fwnode, ··· 343 387 static inline struct irq_domain *irq_find_matching_host(struct device_node *node, 344 388 enum irq_domain_bus_token bus_token) 345 389 { 346 - return irq_find_matching_fwnode(of_node_to_fwnode(node), bus_token); 390 + return irq_find_matching_fwnode(of_fwnode_handle(node), bus_token); 347 391 } 348 392 349 393 static inline struct irq_domain *irq_find_host(struct device_node *node) ··· 357 401 return d; 358 402 } 359 403 360 - static inline struct irq_domain *irq_domain_add_simple(struct device_node *of_node, 361 - unsigned int size, 362 - unsigned int first_irq, 363 - const struct irq_domain_ops *ops, 364 - void *host_data) 365 - { 366 - return irq_domain_create_simple(of_node_to_fwnode(of_node), size, first_irq, ops, host_data); 367 - } 368 - 369 - /** 370 - * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain. 371 - * @of_node: pointer to interrupt controller's device tree node. 372 - * @size: Number of interrupts in the domain. 373 - * @ops: map/unmap domain callbacks 374 - * @host_data: Controller private data pointer 375 - */ 376 - static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node, 377 - unsigned int size, 378 - const struct irq_domain_ops *ops, 379 - void *host_data) 380 - { 381 - struct irq_domain_info info = { 382 - .fwnode = of_node_to_fwnode(of_node), 383 - .size = size, 384 - .hwirq_max = size, 385 - .ops = ops, 386 - .host_data = host_data, 387 - }; 388 - struct irq_domain *d; 389 - 390 - d = irq_domain_instantiate(&info); 391 - return IS_ERR(d) ? NULL : d; 392 - } 393 - 394 404 #ifdef CONFIG_IRQ_DOMAIN_NOMAP 395 - static inline struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, 396 - unsigned int max_irq, 397 - const struct irq_domain_ops *ops, 398 - void *host_data) 405 + static inline struct irq_domain *irq_domain_create_nomap(struct fwnode_handle *fwnode, 406 + unsigned int max_irq, 407 + const struct irq_domain_ops *ops, 408 + void *host_data) 399 409 { 400 - struct irq_domain_info info = { 401 - .fwnode = of_node_to_fwnode(of_node), 410 + const struct irq_domain_info info = { 411 + .fwnode = fwnode, 402 412 .hwirq_max = max_irq, 403 413 .direct_max = max_irq, 404 414 .ops = ops, 405 415 .host_data = host_data, 406 416 }; 407 - struct irq_domain *d; 417 + struct irq_domain *d = irq_domain_instantiate(&info); 408 418 409 - d = irq_domain_instantiate(&info); 410 419 return IS_ERR(d) ? NULL : d; 411 420 } 412 421 413 422 unsigned int irq_create_direct_mapping(struct irq_domain *domain); 414 423 #endif 415 424 416 - static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node, 417 - const struct irq_domain_ops *ops, 418 - void *host_data) 419 - { 420 - struct irq_domain_info info = { 421 - .fwnode = of_node_to_fwnode(of_node), 422 - .hwirq_max = ~0U, 423 - .ops = ops, 424 - .host_data = host_data, 425 - }; 426 - struct irq_domain *d; 427 - 428 - d = irq_domain_instantiate(&info); 429 - return IS_ERR(d) ? NULL : d; 430 - } 431 - 425 + /** 426 + * irq_domain_create_linear - Allocate and register a linear revmap irq_domain. 427 + * @fwnode: pointer to interrupt controller's FW node. 428 + * @size: Number of interrupts in the domain. 429 + * @ops: map/unmap domain callbacks 430 + * @host_data: Controller private data pointer 431 + * 432 + * Returns: Newly created irq_domain 433 + */ 432 434 static inline struct irq_domain *irq_domain_create_linear(struct fwnode_handle *fwnode, 433 - unsigned int size, 434 - const struct irq_domain_ops *ops, 435 - void *host_data) 435 + unsigned int size, 436 + const struct irq_domain_ops *ops, 437 + void *host_data) 436 438 { 437 - struct irq_domain_info info = { 439 + const struct irq_domain_info info = { 438 440 .fwnode = fwnode, 439 441 .size = size, 440 442 .hwirq_max = size, 441 443 .ops = ops, 442 444 .host_data = host_data, 443 445 }; 444 - struct irq_domain *d; 446 + struct irq_domain *d = irq_domain_instantiate(&info); 445 447 446 - d = irq_domain_instantiate(&info); 447 448 return IS_ERR(d) ? NULL : d; 448 449 } 449 450 450 451 static inline struct irq_domain *irq_domain_create_tree(struct fwnode_handle *fwnode, 451 - const struct irq_domain_ops *ops, 452 - void *host_data) 452 + const struct irq_domain_ops *ops, 453 + void *host_data) 453 454 { 454 - struct irq_domain_info info = { 455 + const struct irq_domain_info info = { 455 456 .fwnode = fwnode, 456 457 .hwirq_max = ~0, 457 458 .ops = ops, 458 459 .host_data = host_data, 459 460 }; 460 - struct irq_domain *d; 461 + struct irq_domain *d = irq_domain_instantiate(&info); 461 462 462 - d = irq_domain_instantiate(&info); 463 463 return IS_ERR(d) ? NULL : d; 464 464 } 465 465 466 466 void irq_domain_remove(struct irq_domain *domain); 467 467 468 - int irq_domain_associate(struct irq_domain *domain, unsigned int irq, 469 - irq_hw_number_t hwirq); 470 - void irq_domain_associate_many(struct irq_domain *domain, 471 - unsigned int irq_base, 468 + int irq_domain_associate(struct irq_domain *domain, unsigned int irq, irq_hw_number_t hwirq); 469 + void irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base, 472 470 irq_hw_number_t hwirq_base, int count); 473 471 474 - unsigned int irq_create_mapping_affinity(struct irq_domain *domain, 475 - irq_hw_number_t hwirq, 472 + unsigned int irq_create_mapping_affinity(struct irq_domain *domain, irq_hw_number_t hwirq, 476 473 const struct irq_affinity_desc *affinity); 477 474 unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec); 478 475 void irq_dispose_mapping(unsigned int virq); 479 476 480 - static inline unsigned int irq_create_mapping(struct irq_domain *domain, 481 - irq_hw_number_t hwirq) 477 + /** 478 + * irq_create_mapping - Map a hardware interrupt into linux irq space 479 + * @domain: domain owning this hardware interrupt or NULL for default domain 480 + * @hwirq: hardware irq number in that domain space 481 + * 482 + * Only one mapping per hardware interrupt is permitted. 483 + * 484 + * If the sense/trigger is to be specified, set_irq_type() should be called 485 + * on the number returned from that call. 486 + * 487 + * Returns: Linux irq number or 0 on error 488 + */ 489 + static inline unsigned int irq_create_mapping(struct irq_domain *domain, irq_hw_number_t hwirq) 482 490 { 483 491 return irq_create_mapping_affinity(domain, hwirq, NULL); 484 492 } ··· 451 531 irq_hw_number_t hwirq, 452 532 unsigned int *irq); 453 533 534 + /** 535 + * irq_resolve_mapping - Find a linux irq from a hw irq number. 536 + * @domain: domain owning this hardware interrupt 537 + * @hwirq: hardware irq number in that domain space 538 + * 539 + * Returns: Interrupt descriptor 540 + */ 454 541 static inline struct irq_desc *irq_resolve_mapping(struct irq_domain *domain, 455 542 irq_hw_number_t hwirq) 456 543 { ··· 466 539 467 540 /** 468 541 * irq_find_mapping() - Find a linux irq from a hw irq number. 469 - * @domain: domain owning this hardware interrupt 470 - * @hwirq: hardware irq number in that domain space 542 + * @domain: domain owning this hardware interrupt 543 + * @hwirq: hardware irq number in that domain space 544 + * 545 + * Returns: Linux irq number or 0 if not found 471 546 */ 472 547 static inline unsigned int irq_find_mapping(struct irq_domain *domain, 473 548 irq_hw_number_t hwirq) ··· 482 553 return 0; 483 554 } 484 555 485 - static inline unsigned int irq_linear_revmap(struct irq_domain *domain, 486 - irq_hw_number_t hwirq) 487 - { 488 - return irq_find_mapping(domain, hwirq); 489 - } 490 - 491 556 extern const struct irq_domain_ops irq_domain_simple_ops; 492 557 493 558 /* stock xlate functions */ 494 559 int irq_domain_xlate_onecell(struct irq_domain *d, struct device_node *ctrlr, 495 - const u32 *intspec, unsigned int intsize, 496 - irq_hw_number_t *out_hwirq, unsigned int *out_type); 560 + const u32 *intspec, unsigned int intsize, 561 + irq_hw_number_t *out_hwirq, unsigned int *out_type); 497 562 int irq_domain_xlate_twocell(struct irq_domain *d, struct device_node *ctrlr, 498 - const u32 *intspec, unsigned int intsize, 499 - irq_hw_number_t *out_hwirq, unsigned int *out_type); 563 + const u32 *intspec, unsigned int intsize, 564 + irq_hw_number_t *out_hwirq, unsigned int *out_type); 500 565 int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr, 501 - const u32 *intspec, unsigned int intsize, 502 - irq_hw_number_t *out_hwirq, unsigned int *out_type); 566 + const u32 *intspec, unsigned int intsize, 567 + irq_hw_number_t *out_hwirq, unsigned int *out_type); 503 568 int irq_domain_xlate_twothreecell(struct irq_domain *d, struct device_node *ctrlr, 504 569 const u32 *intspec, unsigned int intsize, 505 570 irq_hw_number_t *out_hwirq, unsigned int *out_type); ··· 510 587 int irq_destroy_ipi(unsigned int irq, const struct cpumask *dest); 511 588 512 589 /* V2 interfaces to support hierarchy IRQ domains. */ 513 - struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain, 514 - unsigned int virq); 515 - void irq_domain_set_info(struct irq_domain *domain, unsigned int virq, 516 - irq_hw_number_t hwirq, 517 - const struct irq_chip *chip, 518 - void *chip_data, irq_flow_handler_t handler, 590 + struct irq_data *irq_domain_get_irq_data(struct irq_domain *domain, unsigned int virq); 591 + void irq_domain_set_info(struct irq_domain *domain, unsigned int virq, irq_hw_number_t hwirq, 592 + const struct irq_chip *chip, void *chip_data, irq_flow_handler_t handler, 519 593 void *handler_data, const char *handler_name); 520 594 void irq_domain_reset_irq_data(struct irq_data *irq_data); 521 595 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 522 - struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, 523 - unsigned int flags, 524 - unsigned int size, 525 - struct fwnode_handle *fwnode, 526 - const struct irq_domain_ops *ops, 527 - void *host_data); 528 - 529 - static inline struct irq_domain *irq_domain_add_hierarchy(struct irq_domain *parent, 530 - unsigned int flags, 531 - unsigned int size, 532 - struct device_node *node, 533 - const struct irq_domain_ops *ops, 534 - void *host_data) 596 + /** 597 + * irq_domain_create_hierarchy - Add a irqdomain into the hierarchy 598 + * @parent: Parent irq domain to associate with the new domain 599 + * @flags: Irq domain flags associated to the domain 600 + * @size: Size of the domain. See below 601 + * @fwnode: Optional fwnode of the interrupt controller 602 + * @ops: Pointer to the interrupt domain callbacks 603 + * @host_data: Controller private data pointer 604 + * 605 + * If @size is 0 a tree domain is created, otherwise a linear domain. 606 + * 607 + * If successful the parent is associated to the new domain and the 608 + * domain flags are set. 609 + * 610 + * Returns: A pointer to IRQ domain, or %NULL on failure. 611 + */ 612 + static inline struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, 613 + unsigned int flags, unsigned int size, 614 + struct fwnode_handle *fwnode, 615 + const struct irq_domain_ops *ops, 616 + void *host_data) 535 617 { 536 - return irq_domain_create_hierarchy(parent, flags, size, 537 - of_node_to_fwnode(node), 538 - ops, host_data); 618 + const struct irq_domain_info info = { 619 + .fwnode = fwnode, 620 + .size = size, 621 + .hwirq_max = size ? : ~0U, 622 + .ops = ops, 623 + .host_data = host_data, 624 + .domain_flags = flags, 625 + .parent = parent, 626 + }; 627 + struct irq_domain *d = irq_domain_instantiate(&info); 628 + 629 + return IS_ERR(d) ? NULL : d; 539 630 } 540 631 541 - int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base, 542 - unsigned int nr_irqs, int node, void *arg, 543 - bool realloc, 632 + int __irq_domain_alloc_irqs(struct irq_domain *domain, int irq_base, unsigned int nr_irqs, 633 + int node, void *arg, bool realloc, 544 634 const struct irq_affinity_desc *affinity); 545 635 void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs); 546 636 int irq_domain_activate_irq(struct irq_data *irq_data, bool early); 547 637 void irq_domain_deactivate_irq(struct irq_data *irq_data); 548 638 549 - static inline int irq_domain_alloc_irqs(struct irq_domain *domain, 550 - unsigned int nr_irqs, int node, void *arg) 639 + /** 640 + * irq_domain_alloc_irqs - Allocate IRQs from domain 641 + * @domain: domain to allocate from 642 + * @nr_irqs: number of IRQs to allocate 643 + * @node: NUMA node id for memory allocation 644 + * @arg: domain specific argument 645 + * 646 + * See __irq_domain_alloc_irqs()' documentation. 647 + */ 648 + static inline int irq_domain_alloc_irqs(struct irq_domain *domain, unsigned int nr_irqs, 649 + int node, void *arg) 551 650 { 552 - return __irq_domain_alloc_irqs(domain, -1, nr_irqs, node, arg, false, 553 - NULL); 651 + return __irq_domain_alloc_irqs(domain, -1, nr_irqs, node, arg, false, NULL); 554 652 } 555 653 556 - int irq_domain_set_hwirq_and_chip(struct irq_domain *domain, 557 - unsigned int virq, 558 - irq_hw_number_t hwirq, 559 - const struct irq_chip *chip, 654 + int irq_domain_set_hwirq_and_chip(struct irq_domain *domain, unsigned int virq, 655 + irq_hw_number_t hwirq, const struct irq_chip *chip, 560 656 void *chip_data); 561 - void irq_domain_free_irqs_common(struct irq_domain *domain, 562 - unsigned int virq, 657 + void irq_domain_free_irqs_common(struct irq_domain *domain, unsigned int virq, 563 658 unsigned int nr_irqs); 564 - void irq_domain_free_irqs_top(struct irq_domain *domain, 565 - unsigned int virq, unsigned int nr_irqs); 659 + void irq_domain_free_irqs_top(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs); 566 660 567 661 int irq_domain_push_irq(struct irq_domain *domain, int virq, void *arg); 568 662 int irq_domain_pop_irq(struct irq_domain *domain, int virq); 569 663 570 - int irq_domain_alloc_irqs_parent(struct irq_domain *domain, 571 - unsigned int irq_base, 664 + int irq_domain_alloc_irqs_parent(struct irq_domain *domain, unsigned int irq_base, 572 665 unsigned int nr_irqs, void *arg); 573 666 574 - void irq_domain_free_irqs_parent(struct irq_domain *domain, 575 - unsigned int irq_base, 667 + void irq_domain_free_irqs_parent(struct irq_domain *domain, unsigned int irq_base, 576 668 unsigned int nr_irqs); 577 669 578 - int irq_domain_disconnect_hierarchy(struct irq_domain *domain, 579 - unsigned int virq); 670 + int irq_domain_disconnect_hierarchy(struct irq_domain *domain, unsigned int virq); 580 671 581 672 static inline bool irq_domain_is_hierarchy(struct irq_domain *domain) 582 673 { ··· 599 662 600 663 static inline bool irq_domain_is_ipi(struct irq_domain *domain) 601 664 { 602 - return domain->flags & 603 - (IRQ_DOMAIN_FLAG_IPI_PER_CPU | IRQ_DOMAIN_FLAG_IPI_SINGLE); 665 + return domain->flags & (IRQ_DOMAIN_FLAG_IPI_PER_CPU | IRQ_DOMAIN_FLAG_IPI_SINGLE); 604 666 } 605 667 606 668 static inline bool irq_domain_is_ipi_per_cpu(struct irq_domain *domain) ··· 628 692 } 629 693 630 694 #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ 631 - static inline int irq_domain_alloc_irqs(struct irq_domain *domain, 632 - unsigned int nr_irqs, int node, void *arg) 695 + static inline int irq_domain_alloc_irqs(struct irq_domain *domain, unsigned int nr_irqs, 696 + int node, void *arg) 633 697 { 634 698 return -1; 635 699 } 636 700 637 - static inline void irq_domain_free_irqs(unsigned int virq, 638 - unsigned int nr_irqs) { } 701 + static inline void irq_domain_free_irqs(unsigned int virq, unsigned int nr_irqs) { } 639 702 640 703 static inline bool irq_domain_is_hierarchy(struct irq_domain *domain) 641 704 { ··· 674 739 #endif /* CONFIG_IRQ_DOMAIN_HIERARCHY */ 675 740 676 741 #ifdef CONFIG_GENERIC_MSI_IRQ 677 - int msi_device_domain_alloc_wired(struct irq_domain *domain, unsigned int hwirq, 678 - unsigned int type); 742 + int msi_device_domain_alloc_wired(struct irq_domain *domain, unsigned int hwirq, unsigned int type); 679 743 void msi_device_domain_free_wired(struct irq_domain *domain, unsigned int virq); 680 744 #else 681 745 static inline int msi_device_domain_alloc_wired(struct irq_domain *domain, unsigned int hwirq, ··· 689 755 } 690 756 #endif 691 757 758 + /* Deprecated functions. Will be removed in the merge window */ 759 + static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node) 760 + { 761 + return node ? &node->fwnode : NULL; 762 + } 763 + 764 + static inline struct irq_domain *irq_domain_add_tree(struct device_node *of_node, 765 + const struct irq_domain_ops *ops, 766 + void *host_data) 767 + { 768 + struct irq_domain_info info = { 769 + .fwnode = of_fwnode_handle(of_node), 770 + .hwirq_max = ~0U, 771 + .ops = ops, 772 + .host_data = host_data, 773 + }; 774 + struct irq_domain *d; 775 + 776 + d = irq_domain_instantiate(&info); 777 + return IS_ERR(d) ? NULL : d; 778 + } 779 + 780 + static inline struct irq_domain *irq_domain_add_linear(struct device_node *of_node, 781 + unsigned int size, 782 + const struct irq_domain_ops *ops, 783 + void *host_data) 784 + { 785 + struct irq_domain_info info = { 786 + .fwnode = of_fwnode_handle(of_node), 787 + .size = size, 788 + .hwirq_max = size, 789 + .ops = ops, 790 + .host_data = host_data, 791 + }; 792 + struct irq_domain *d; 793 + 794 + d = irq_domain_instantiate(&info); 795 + return IS_ERR(d) ? NULL : d; 796 + } 797 + 692 798 #else /* CONFIG_IRQ_DOMAIN */ 693 799 static inline void irq_dispose_mapping(unsigned int virq) { } 694 - static inline struct irq_domain *irq_find_matching_fwnode( 695 - struct fwnode_handle *fwnode, enum irq_domain_bus_token bus_token) 800 + static inline struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode, 801 + enum irq_domain_bus_token bus_token) 696 802 { 697 803 return NULL; 698 804 }
+3 -71
kernel/irq/irqdomain.c
··· 480 480 } 481 481 EXPORT_SYMBOL_GPL(irq_domain_create_simple); 482 482 483 - /** 484 - * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain. 485 - * @of_node: pointer to interrupt controller's device tree node. 486 - * @size: total number of irqs in legacy mapping 487 - * @first_irq: first number of irq block assigned to the domain 488 - * @first_hwirq: first hwirq number to use for the translation. Should normally 489 - * be '0', but a positive integer can be used if the effective 490 - * hwirqs numbering does not begin at zero. 491 - * @ops: map/unmap domain callbacks 492 - * @host_data: Controller private data pointer 493 - * 494 - * Note: the map() callback will be called before this function returns 495 - * for all legacy interrupts except 0 (which is always the invalid irq for 496 - * a legacy controller). 497 - */ 498 - struct irq_domain *irq_domain_add_legacy(struct device_node *of_node, 499 - unsigned int size, 500 - unsigned int first_irq, 501 - irq_hw_number_t first_hwirq, 502 - const struct irq_domain_ops *ops, 503 - void *host_data) 504 - { 505 - return irq_domain_create_legacy(of_node_to_fwnode(of_node), size, 506 - first_irq, first_hwirq, ops, host_data); 507 - } 508 - EXPORT_SYMBOL_GPL(irq_domain_add_legacy); 509 - 510 483 struct irq_domain *irq_domain_create_legacy(struct fwnode_handle *fwnode, 511 484 unsigned int size, 512 485 unsigned int first_irq, ··· 858 885 { 859 886 int i; 860 887 861 - fwspec->fwnode = of_node_to_fwnode(np); 888 + fwspec->fwnode = of_fwnode_handle(np); 862 889 fwspec->param_count = count; 863 890 864 891 for (i = 0; i < count; i++) ··· 1281 1308 EXPORT_SYMBOL_GPL(irq_domain_reset_irq_data); 1282 1309 1283 1310 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY 1284 - /** 1285 - * irq_domain_create_hierarchy - Add a irqdomain into the hierarchy 1286 - * @parent: Parent irq domain to associate with the new domain 1287 - * @flags: Irq domain flags associated to the domain 1288 - * @size: Size of the domain. See below 1289 - * @fwnode: Optional fwnode of the interrupt controller 1290 - * @ops: Pointer to the interrupt domain callbacks 1291 - * @host_data: Controller private data pointer 1292 - * 1293 - * If @size is 0 a tree domain is created, otherwise a linear domain. 1294 - * 1295 - * If successful the parent is associated to the new domain and the 1296 - * domain flags are set. 1297 - * Returns pointer to IRQ domain, or NULL on failure. 1298 - */ 1299 - struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, 1300 - unsigned int flags, 1301 - unsigned int size, 1302 - struct fwnode_handle *fwnode, 1303 - const struct irq_domain_ops *ops, 1304 - void *host_data) 1305 - { 1306 - struct irq_domain_info info = { 1307 - .fwnode = fwnode, 1308 - .size = size, 1309 - .hwirq_max = size, 1310 - .ops = ops, 1311 - .host_data = host_data, 1312 - .domain_flags = flags, 1313 - .parent = parent, 1314 - }; 1315 - struct irq_domain *d; 1316 - 1317 - if (!info.size) 1318 - info.hwirq_max = ~0U; 1319 - 1320 - d = irq_domain_instantiate(&info); 1321 - return IS_ERR(d) ? NULL : d; 1322 - } 1323 - EXPORT_SYMBOL_GPL(irq_domain_create_hierarchy); 1324 - 1325 1311 static void irq_domain_insert_irq(int virq) 1326 1312 { 1327 1313 struct irq_data *data; ··· 1996 2064 domain->flags |= IRQ_DOMAIN_FLAG_HIERARCHY; 1997 2065 } 1998 2066 #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ 1999 - /** 2067 + /* 2000 2068 * irq_domain_get_irq_data - Get irq_data associated with @virq and @domain 2001 2069 * @domain: domain to match 2002 2070 * @virq: IRQ number to get irq_data ··· 2010 2078 } 2011 2079 EXPORT_SYMBOL_GPL(irq_domain_get_irq_data); 2012 2080 2013 - /** 2081 + /* 2014 2082 * irq_domain_set_info - Set the complete data for a @virq in @domain 2015 2083 * @domain: Interrupt domain to match 2016 2084 * @virq: IRQ number