From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752369AbdJaNQV (ORCPT ); Tue, 31 Oct 2017 09:16:21 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:35050 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbdJaNQT (ORCPT ); Tue, 31 Oct 2017 09:16:19 -0400 Date: Tue, 31 Oct 2017 14:16:17 +0100 From: Andrew Lunn To: Linus Walleij Cc: Gregory CLEMENT , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Jason Cooper , Sebastian Hesselbarth , Thomas Petazzoni , "linux-arm-kernel@lists.infradead.org" , Antoine Tenart , =?iso-8859-1?Q?Miqu=E8l?= Raynal , Nadav Haklai , Victor Gu , Marcin Wojtas , Wilson Ding , Hua Jing , Neta Zur Hershkovits , Ken Ma Subject: Re: [PATCH] pinctrl: armada-37xx: Add edge both type gpio irq support Message-ID: <20171031131617.GA11647@lunn.ch> References: <20171019131003.9684-1-gregory.clement@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Patch applied. > > The discussion here is interesting, it is customary for GPIO drivers > to implement double-edge detection emulation by swapping the > edge detector around like this. Hi Linus I was not aware this was customary. > It might be possible to collect some generic information about > this in the Documentation/gpio/driver.txt document. Yes, i think it should be documented somewhere. Even in the use case here, detecting an SD card being inserted/removed, you could get some bounce on the microswitch, miss an edge, and be in the wrong state. Andrew