On Mon, Jul 01 2024 at 13:59, Matti Vaittinen wrote:
+static int regmap_irq_create_domain(struct fwnode_handle *fwnode, int irq_base,
+ const struct regmap_irq_chip *chip,
+ struct regmap_irq_chip_data *d)
+{
+ struct irq_domain_info info = {
+ .fwnode = fwnode,
+ .size = irq_base + chip->num_irqs,
+ .hwirq_max = irq_base + chip->num_irqs,
This is not correct. irq_base is the linux interrupt number base. The
first_hwirq argument of irq_domain_create_legacy() is 0.
+ .ops = ®map_domain_ops,
+ .host_data = d,
+ .name_suffix = chip->domain_suffix,
+ };
+
+ d->domain = irq_domain_instantiate(&info);
+ if (IS_ERR(d->domain)) {
+ dev_err(d->map->dev, "Failed to create IRQ domain\n");
+ return PTR_ERR(d->domain);
+ }
+
+ if (irq_base)
+ irq_domain_associate_many(d->domain, irq_base, 0, chip->num_irqs);
I wonder whether this can be handled at the core. Let me stare at it.