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

Configure Feed

Select the types of activity you want to include in your feed.

mfd: 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>
Link: https://lore.kernel.org/all/20250319092951.37667-25-jirislaby@kernel.org



authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
a36aa0f7 8529e33b

+43 -55
+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,