lkml.org 
[lkml]   [2016]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] gpio/gpiolib: Forbid irqchip default trigger if probed over DT
On Thu, Sep 08, 2016 at 12:13:27AM +0200, Linus Walleij wrote:
> On Tue, Sep 6, 2016 at 3:59 PM, Marc Zyngier <marc.zyngier@arm.com> wrote:
>
> > Using a default trigger is a bad idea if using DT to configure
> > interrupts, as the device's interrupt specifier will always contain
> > the trigger configuration.
> >
> > Let's warn about that particular situation, and revert to not
> > having a default. Hopefully, the couple of drivers still using
> > this feature will quickly be fixed.
> >
> > Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>
> Patch applied. This is a good way to get rid of this madness.
>
> > + /*
> > + * Specifying a default trigger is a terrible idea if DT is
> > + * used to configure the interrupts, as you may end-up with
> > + * conflicting triggers. Tell the user, and reset to NONE.
> > + */
> > + if (WARN_ON(of_node && type != IRQ_TYPE_NONE,
> > + "%s: Ignoring %d default trigger\n", of_node->full_name))
> > + type = IRQ_TYPE_NONE;
>
> I *strongly* suspect this is bad also when using ACPI.

I agree.

> Would the GPIO ACPI people devise a patch on top of this
> to emit the same warning for the ACPI usecase?

Yup, I'll make a patch for ACPI next week.

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.080 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site