Re: [PATCH 02/13] mfd: pm8008: fix regmap irq chip initialisation

Johan Hovold
2024-05-07T15:01:01Z

On Mon, May 06, 2024 at 09:56:05PM +0300, Andy Shevchenko wrote:
> Mon, May 06, 2024 at 05:08:19PM +0200, Johan Hovold kirjoitti:
> > The regmap irq array is potentially shared between multiple PMICs and
>
> IRQ

I'm referring to an array of struct regmap_irq. Perhaps I can add an
underscore.

> > should only contain static data.
> >
> > Use a custom macro to initialise also the type fields and drop the
> > unnecessary updates on each probe.
>
> ...
>
> > +#define _IRQ_TYPE_ALL (IRQ_TYPE_EDGE_BOTH | IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)
>
> This is repetition of IRQ_TYPE_DEFAULT.

Thanks, I guess I should use IRQ_TYPE_SENSE_MASK here even.

> ...
>
> > - dev_err(dev, "Failed to probe irq periphs: %d\n", rc);
> > + dev_err(dev, "failed to add IRQ chip: %d\n", rc);
>
> dev_err_probe(...); ?

This function won't return -EPROBE_DEFER, and that would be a separate
change in any case.

Johan