Hi Rob, On Wed, 30 Jul 2025 15:47:33 -0500 Rob Herring <robh@xxxxxxxxxx> wrote: ... > > > > + > > > > +static int irqmux_imap_cb(void *data, const __be32 *imap, > > > > + const struct of_phandle_args *parent_args) > > > > +{ > > > > + struct irqmux_cb_data *priv = data; > > > > + u32 src_hwirq; > > > > + int index; > > > > + > > > > + /* > > > > + * The child #address-cells is 0. Already checked in irqmux_setup(). > > > > + * The first value in imap is the src_hwirq > > > > + */ > > > > + src_hwirq = be32_to_cpu(*imap); > > > > > > The iterator should take care of the endianness conversion. > > > > Ok, it will take care. > > > > > > > > > + > > > > + /* > > > > + * Get the index in our interrupt array that matches the parent in the > > > > + * interrupt-map > > > > + */ > > > > + index = irqmux_find_interrupt_index(priv->dev, priv->np, parent_args); > > > > + if (index < 0) > > > > + return dev_err_probe(priv->dev, index, "output interrupt not found\n"); > > > > + > > > > + dev_info(priv->dev, "interrupt %u mapped to output interrupt[%u]\n", > > > > + src_hwirq, index); > > > > > > Do you even need "interrupts"? Just make the "interrupt-map" index > > > important and correspond to the hw index. That would greatly simplify > > > all this. > > > > I would like to avoid to be based on the interrupt-map index. > > > > Indeed, IMHO, it is less robust. I don't thing that we can enforce the > > interrupt-map items order. Based on interrupt-map index, we need to ensure > > that the first item is related to GIC 103, the second one to GIC 104 and so > > on. > > How exactly are you enforcing that order for "interrupts"? You can't. I can impose interrupt-names property in the binding and at least, those names are to be in order (checked by dtbs_check). Based on that if a mismatch is present between interrupt-names and interrupts it is an issue in the dts used. With interrupt-map, nothing can be imposed and so nothing can be checked. > > Aren't you just duplicating the information in "interrupts" in the > interrupt-map. > I will remove 'interrupts' in the next iteration and use only 'interrupt-map'. I will add some information related to the order of the interrup-map item in the binding (description of the interrupt-map property). Best regards, Hervé