Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756491AbcJWXaP (ORCPT ); Sun, 23 Oct 2016 19:30:15 -0400 Received: from mail-qt0-f179.google.com ([209.85.216.179]:36764 "EHLO mail-qt0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752423AbcJWXaO (ORCPT ); Sun, 23 Oct 2016 19:30:14 -0400 MIME-Version: 1.0 In-Reply-To: <1476774988-13484-1-git-send-email-patrice.chotard@st.com> References: <1476774988-13484-1-git-send-email-patrice.chotard@st.com> From: Linus Walleij Date: Mon, 24 Oct 2016 01:30:13 +0200 Message-ID: Subject: Re: [PATCH] pinctrl: st: don't specify default interrupt trigger To: Patrice CHOTARD Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "open list:ARM/STI ARCHITECTURE" , Peter Griffin , Lee Jones Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1041 Lines: 29 On Tue, Oct 18, 2016 at 9:16 AM, wrote: > From: Patrice Chotard > > Thanks to 332e99d5ae4 which now alerts of default > trigger usage when configuring interrupts. > > Signed-off-by: Patrice Chotard Patch applied with Peter's ACK. Pls also look into the following: __gpio_irq_handler seems to be doing some stuff per-IRQ that only pertains to edge-triggered IRQs. Normally that should be handled by: - Setting default handler to handle_bad_irq() - Setting handler to handle_edge_irq() or handle_level_irq() in .set_type() - Implement .irq_ack() on the irqchip and handle the edge-specific ACKing there. See for example drivers/gpio/gpio-pl061.c. I am not *sure* this applies to pinctrl-st.c but please check if it provides more elegant code. Notmally the .irq_ack() is for edge detection hardware that allows ACKing the ege IRQ in a separate register and after that we can raise another edge IRQ while the current IRQ is being handled. Yours, Linus Walleij