]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pinctrl: Switch to irq_domain_create_*()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 19 Mar 2025 09:29:23 +0000 (10:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 May 2025 19:06:11 +0000 (21:06 +0200)
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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/all/20250319092951.37667-31-jirislaby@kernel.org
drivers/pinctrl/mediatek/mtk-eint.c
drivers/pinctrl/pinctrl-at91-pio4.c
drivers/pinctrl/pinctrl-single.c
drivers/pinctrl/sunxi/pinctrl-sunxi.c

index ced4ee509b5b6df25e240d061d6ebb94b59c2a1d..8bbe2aa74861e6d5e8ad601f3e8a11d4d6244ee5 100644 (file)
@@ -565,9 +565,8 @@ int mtk_eint_do_init(struct mtk_eint *eint)
                        goto err_eint;
        }
 
-       eint->domain = irq_domain_add_linear(eint->dev->of_node,
-                                            eint->hw->ap_num,
-                                            &irq_domain_simple_ops, NULL);
+       eint->domain = irq_domain_create_linear(of_fwnode_handle(eint->dev->of_node),
+                                               eint->hw->ap_num, &irq_domain_simple_ops, NULL);
        if (!eint->domain)
                goto err_eint;
 
index 8b01d312305ad40c38c45ee48b34fed44ff87a4b..e57ac4ea91dd47f1cfc364c30a05220d053488e9 100644 (file)
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
                dev_dbg(dev, "bank %i: irq=%d\n", i, ret);
        }
 
-       atmel_pioctrl->irq_domain = irq_domain_add_linear(dev->of_node,
+       atmel_pioctrl->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node),
                        atmel_pioctrl->gpio_chip->ngpio,
                        &irq_domain_simple_ops, NULL);
        if (!atmel_pioctrl->irq_domain)
index 5be14dc979e26d14d3fc67ee932519ee8d438042..5cda6201b60f53e62f3f50b8641ec894106111e0 100644 (file)
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,
 
        /*
         * We can use the register offset as the hardirq
-        * number as irq_domain_add_simple maps them lazily.
+        * number as irq_domain_create_simple maps them lazily.
         * This way we can easily support more than one
         * interrupt per function if needed.
         */
        num_irqs = pcs->size;
 
-       pcs->domain = irq_domain_add_simple(np, num_irqs, 0,
-                                           &pcs_irqdomain_ops,
-                                           pcs_soc);
+       pcs->domain = irq_domain_create_simple(of_fwnode_handle(np),
+                                              num_irqs, 0,
+                                              &pcs_irqdomain_ops,
+                                              pcs_soc);
        if (!pcs->domain) {
                irq_set_chained_handler(pcs_soc->irq, NULL);
                return -EINVAL;
index f1c5a991cf7b522bbebfc86f848113fcddbee4df..bf8612d72daacdde6209b0b5c84e010ef3b846c9 100644 (file)
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev,
                }
        }
 
-       pctl->domain = irq_domain_add_linear(node,
-                                            pctl->desc->irq_banks * IRQ_PER_BANK,
-                                            &sunxi_pinctrl_irq_domain_ops,
-                                            pctl);
+       pctl->domain = irq_domain_create_linear(of_fwnode_handle(node),
+                                               pctl->desc->irq_banks * IRQ_PER_BANK,
+                                               &sunxi_pinctrl_irq_domain_ops, pctl);
        if (!pctl->domain) {
                dev_err(&pdev->dev, "Couldn't register IRQ domain\n");
                ret = -ENOMEM;