irq_domain_add_*() interfaces are going away as being obsolete now.
Switch to the preferred irq_domain_create_*() ones. Those differ in the
node parameter: They take more generic struct fwnode_handle instead of
struct device_node. Therefore, of_fwnode_handle() is added around the
original parameter.
Note some of the users can likely use dev->fwnode directly instead of
indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not
guaranteed to be set for all, so this has to be investigated on case to
case basis (by people who can actually test with the HW).
[ tglx: Fix up subject prefix ]
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-15-jirislaby@kernel.org
 
        writel_relaxed(~0, irqbase + SA1111_INTSTATCLR0);
        writel_relaxed(~0, irqbase + SA1111_INTSTATCLR1);
 
-       sachip->irqdomain = irq_domain_add_linear(NULL, SA1111_IRQ_NR,
-                                                 &sa1111_irqdomain_ops,
-                                                 sachip);
+       sachip->irqdomain = irq_domain_create_linear(NULL, SA1111_IRQ_NR,
+                                                    &sa1111_irqdomain_ops,
+                                                    sachip);
        if (!sachip->irqdomain) {
                irq_free_descs(sachip->irq_base, SA1111_IRQ_NR);
                return -ENOMEM;
 
                return -ENOMEM;
        }
 
-       domain = irq_domain_add_hierarchy(parent_domain, 0, 0,
-                                         node, &exynos_pmu_domain_ops,
-                                         NULL);
+       domain = irq_domain_create_hierarchy(parent_domain, 0, 0, of_fwnode_handle(node),
+                                            &exynos_pmu_domain_ops, NULL);
        if (!domain) {
                iounmap(pmu_base_addr);
                pmu_base_addr = NULL;
 
        WARN_ON(irq_base < 0);
 
        np = of_find_compatible_node(NULL, NULL, "fsl,avic");
-       domain = irq_domain_add_legacy(np, AVIC_NUM_IRQS, irq_base, 0,
-                                      &irq_domain_simple_ops, NULL);
+       domain = irq_domain_create_legacy(of_fwnode_handle(np), AVIC_NUM_IRQS, irq_base, 0,
+                                         &irq_domain_simple_ops, NULL);
        WARN_ON(!domain);
 
        for (i = 0; i < AVIC_NUM_IRQS / 32; i++, irq_base += 32)
 
        if (WARN_ON(!gpc_base))
                return -ENOMEM;
 
-       domain = irq_domain_add_hierarchy(parent_domain, 0, GPC_MAX_IRQS,
-                                         node, &imx_gpc_domain_ops,
-                                         NULL);
+       domain = irq_domain_create_hierarchy(parent_domain, 0, GPC_MAX_IRQS, of_fwnode_handle(node),
+                                            &imx_gpc_domain_ops, NULL);
        if (!domain) {
                iounmap(gpc_base);
                return -ENOMEM;
 
        irq_base = irq_alloc_descs(-1, 0, TZIC_NUM_IRQS, numa_node_id());
        WARN_ON(irq_base < 0);
 
-       domain = irq_domain_add_legacy(np, TZIC_NUM_IRQS, irq_base, 0,
-                                      &irq_domain_simple_ops, NULL);
+       domain = irq_domain_create_legacy(of_fwnode_handle(np), TZIC_NUM_IRQS, irq_base, 0,
+                                         &irq_domain_simple_ops, NULL);
        WARN_ON(!domain);
 
        for (i = 0; i < 4; i++, irq_base += 32)
 
        omap_l2_irq = irq_base;
        omap_l2_irq -= NR_IRQS_LEGACY;
 
-       domain = irq_domain_add_legacy(NULL, nr_irqs, irq_base, 0,
-                                      &irq_domain_simple_ops, NULL);
+       domain = irq_domain_create_legacy(NULL, nr_irqs, irq_base, 0, &irq_domain_simple_ops, NULL);
 
        pr_info("Total of %lu interrupts in %i interrupt banks\n",
                nr_irqs, irq_bank_count);
 
                wakeupgen_ops = &am43xx_wakeupgen_ops;
        }
 
-       domain = irq_domain_add_hierarchy(parent_domain, 0, max_irqs,
-                                         node, &wakeupgen_domain_ops,
-                                         NULL);
+       domain = irq_domain_create_hierarchy(parent_domain, 0, max_irqs, of_fwnode_handle(node),
+                                            &wakeupgen_domain_ops, NULL);
        if (!domain) {
                iounmap(wakeupgen_base);
                return -ENOMEM;
 
        int n;
 
        pxa_internal_irq_nr = irq_nr;
-       pxa_irq_domain = irq_domain_add_legacy(node, irq_nr,
-                                              PXA_IRQ(0), 0,
-                                              &pxa_irq_ops, NULL);
+       pxa_irq_domain = irq_domain_create_legacy(of_fwnode_handle(node), irq_nr, PXA_IRQ(0), 0,
+                                                 &pxa_irq_ops, NULL);
        if (!pxa_irq_domain)
                panic("Unable to add PXA IRQ domain\n");
        irq_set_default_domain(pxa_irq_domain);
 
                               IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE);
 
        /* Setup irq domain on top of the generic chip. */
-       ochip->domain = irq_domain_add_legacy(NULL,
-                                             ochip->chip.ngpio,
-                                             ochip->secondary_irq_base,
-                                             ochip->secondary_irq_base,
-                                             &irq_domain_simple_ops,
-                                             ochip);
+       ochip->domain = irq_domain_create_legacy(NULL,
+                                                ochip->chip.ngpio,
+                                                ochip->secondary_irq_base,
+                                                ochip->secondary_irq_base,
+                                                &irq_domain_simple_ops,
+                                                ochip);
        if (!ochip->domain)
                panic("%s: couldn't allocate irq domain (DT).\n",
                      ochip->chip.label);