[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VcgUmOoo-jRbM-Gyp1JTY-2rJri8e7u2miYSvRM_4HmPg@mail.gmail.com>
Date: Thu, 1 Mar 2018 14:09:06 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Baolin Wang <baolin.wang@...aro.org>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stephen lu <lumotuwe@...il.com>,
Arvind Yadav <arvind.yadav.cs@...il.com>,
Joseph Lo <josephl@...dia.com>,
Kate Stewart <kstewart@...uxfoundation.org>,
Philippe Ombredanne <pombredanne@...b.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-input <linux-input@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mark Brown <broonie@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH v4] Input: gpio_keys: Add level trigger support for GPIO keys
On Thu, Mar 1, 2018 at 9:36 AM, Baolin Wang <baolin.wang@...aro.org> wrote:
> On some platforms (such as Spreadtrum platform), the GPIO keys can only
> be triggered by level type. So this patch introduces one trigger_type to
> indicate if the button's interrupt type is level trigger or edge trigger.
> button->irq =
> irq_of_parse_and_map(to_of_node(child), 0);
AFAIU, 0 means NO_IRQ, thus,
> + if (button->irq)
> + button->trigger_type =
> + irq_get_trigger_type(button->irq);
irq_get_trigger_type(NO_IRQ) should return 0.
Therefore, if (button->irq) is redundant.
Did I miss anything?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists