[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkdaC9dUQQC8Q5bPDcwwgJZmqnqZ04H0EJR46K8sMzx0zGQ@mail.gmail.com>
Date: Tue, 12 May 2015 13:55:00 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@...el.com>,
Freddy Paul <freddy.paul@...el.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: cherryview: Read triggering type from HW if not
set when requested
On Tue, May 12, 2015 at 12:35 PM, Mika Westerberg
<mika.westerberg@...ux.intel.com> wrote:
> If a driver does not set interrupt triggering type when it calls
> request_irq(), it means use the pin as the hardware/firmware has
> configured it. There are some drivers doing this. One example is
> drivers/input/serio/i8042.c that requests the interrupt like:
>
> error = request_irq(I8042_KBD_IRQ, i8042_interrupt, IRQF_SHARED,
> "i8042", i8042_platform_device);
>
> It assumes the interrupt is already properly configured. This is true in
> case of interrupts connected to the IO-APIC. However, some Intel
> Braswell/Cherryview based machines use a GPIO here instead for the internal
> keyboard controller.
>
> This is a problem because even if the pin/interrupt is properly configured,
> the irqchip ->irq_set_type() will never be called as the triggering flags
> are 0. Because of that we do not have correct interrupt flow handler set
> for the interrupt.
>
> Fix this by adding a custom ->irq_startup() that checks if the interrupt
> has no triggering type set and in that case read the type directly from the
> hardware and install correct flow handler along with the mapping.
>
> Reported-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@...el.com>
> Reported-by: Freddy Paul <freddy.paul@...el.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
Patch applied for fixes.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists