From: mika.westerberg@linux•intel.com (Mika Westerberg)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC PATCH] gpio/gpiolib: Forbid irqchip default trigger if probed over DT
Date: Thu, 8 Sep 2016 14:14:57 +0300 [thread overview]
Message-ID: <20160908111457.GD15313@lahna.fi.intel.com> (raw)
In-Reply-To: <CACRpkdaLf5H6qhF0kS5W-p3YmKh5DxZxyinoV5u9HBKts9CQLg@mail.gmail.com>
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.
prev parent reply other threads:[~2016-09-08 11:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 13:59 [RFC PATCH] gpio/gpiolib: Forbid irqchip default trigger if probed over DT Marc Zyngier
2016-09-07 22:13 ` Linus Walleij
2016-09-08 11:14 ` Mika Westerberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160908111457.GD15313@lahna.fi.intel.com \
--to=mika.westerberg@linux$(echo .)intel.com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox