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

soc: Switch to irq_domain_create_*()

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>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu> # For soc/fsl
Link: https://lore.kernel.org/all/20250319092951.37667-35-jirislaby@kernel.org



authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
6e4e30d7 b625f934

+9 -8
+2 -2
drivers/soc/dove/pmu.c
··· 274 274 writel(0, pmu->pmc_base + PMC_IRQ_MASK); 275 275 writel(0, pmu->pmc_base + PMC_IRQ_CAUSE); 276 276 277 - domain = irq_domain_add_linear(pmu->of_node, NR_PMU_IRQS, 278 - &irq_generic_chip_ops, NULL); 277 + domain = irq_domain_create_linear(of_fwnode_handle(pmu->of_node), NR_PMU_IRQS, 278 + &irq_generic_chip_ops, NULL); 279 279 if (!domain) { 280 280 pr_err("%s: unable to add irq domain\n", name); 281 281 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;