From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758330AbcJYG5O (ORCPT ); Tue, 25 Oct 2016 02:57:14 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35526 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755577AbcJYG5L (ORCPT ); Tue, 25 Oct 2016 02:57:11 -0400 Message-ID: <580F0244.7070701@baylibre.com> Date: Tue, 25 Oct 2016 08:57:08 +0200 From: Neil Armstrong User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Linus Walleij , Andrey Smirnov CC: Peter Rosin , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , Roland Stigge , Vladimir Zapolskiy Subject: Re: [PATCH v3] pinctrl: Add SX150X GPIO Extender Pinctrl Driver References: <1477040998-2016-1-git-send-email-narmstrong@baylibre.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, Le 24/10/2016 16:39, Linus Walleij a écrit : > On Mon, Oct 24, 2016 at 6:51 AM, Andrey Smirnov > wrote: > >> It seem strange to me that the driver uses "handle_edge_irq", given >> how none of the individual interrupts seem to require any ACKing, >> since it is all handled in sx150x_irq_thread_fn(), line 533. More so, >> I had trouble finding who/where sets .irq_ack() callback, which AFAIU >> is mandatory for handle_edge_irq(). > > Yes that looks strange. > > Neil have you tested IRQs with this code? To be frank, I took the IRQ code from the GPIO driver verbatim, and only tested a simple use case on beagle bone black. The interrupt code is very complex and sincerely I was not able to understand clearly how it worked. The IRQ_TYPE_EDGE_BOTH did work for me since the BBB irq controller dealt with it. I will dig in the datasheet and run more uses cases next week, but since the code hasn't changed since the GPIO driver, so this is a nice to have ! > > If there is trouble, please follow up with a fix for the edge handler. > Maybe it should just be handle_simple_irq(). > > Yours, > Linus Walleij > Andrey, can we talk over irc somehow ? I'm idling as narmstrong on freenode. Neil