Re: [PATCH RESEND v6 2/7] mfd: rn5t618: add IRQ support

From: Andreas Kemnade
Date: Thu Mar 19 2020 - 13:23:16 EST


On Thu, 19 Mar 2020 16:11:49 +0000
Lee Jones <lee.jones@xxxxxxxxxx> wrote:

> On Fri, 13 Mar 2020, Andreas Kemnade wrote:
[...]
I agree to the other comments.

> > + if (priv->irq > 0) {
>
> There are already have checks in rn5t618_irq_init().
>
> Just call it regardless.
>
> > + if (rn5t618_irq_init(priv))
>
> If this returns an error, you should return that error from .probe().
>
Hmm, that would be a regression. Current users do not specify an interrupt
in the devicetree yet, so the MFD driver would stop working on these devices
completely.
Therefore I think we should keep the existing functionality if there is no
IRQ specified in the devicetree and ignore the error. The new subdevices
are checking the IRQ availability and give error messages and have
reduced functionality.

Regards,
Andreas

Attachment: pgpPf0tiOeG6b.pgp
Description: OpenPGP digital signature