From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751774AbdBWPqP (ORCPT ); Thu, 23 Feb 2017 10:46:15 -0500 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:4095 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751202AbdBWPqN (ORCPT ); Thu, 23 Feb 2017 10:46:13 -0500 Subject: Re: [RFC 3/4] dt-bindings: iio: add support for GPIO triggers To: Linus Walleij References: <1487347429-31761-1-git-send-email-fabrice.gasnier@st.com> <1487347429-31761-4-git-send-email-fabrice.gasnier@st.com> CC: Jonathan Cameron , Russell King , Rob Herring , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-iio@vger.kernel.org" , Mark Rutland , Maxime Coquelin , Alexandre TORGUE , Lars-Peter Clausen , Hartmut Knaack , Peter Meerwald , Benjamin Gaignard , Benjamin Gaignard From: Fabrice Gasnier Message-ID: Date: Thu, 23 Feb 2017 16:45:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.48] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To SFHDAG5NODE3.st.com (10.75.127.15) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-23_11:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/23/2017 04:03 PM, Linus Walleij wrote: > On Fri, Feb 17, 2017 at 5:03 PM, Fabrice Gasnier wrote: > >> Document Industrial I/O GPIO trigger support. >> >> Signed-off-by: Fabrice Gasnier > (...) >> +- gpio-trigger-rising-edge: A rising edge on GPIO will trigger. >> +- gpio-trigger-falling-edge: A falling edge on GPIO will trigger. >> + Note: Both rising and falling edge may be used. In case none of >> + rising or falling edge is selected, rising edge is selected by >> + default. > > We have GPIO_ACTIVE*_HIGH and GPIO_ACTIVE_LOW in the > gpios second cell already. > > Can't we simply use that and specify that for this usecase, reading > that cell as GPIO_ACTIVE_HIGH == trigger on rising edge and > GPIO_ACTIVE_LOW == trigger on falling edge? Hi Linus, Thanks for reviewing, I think I'll simply drop patch 3 & 4, as suggested by Lars and Jonathan, on patch 4, to use interrupt binding directly. Then standard interrupt binding can be used instead. Only thing is to add OF support for iio_interrupt_trigger. BR, Fabrice > > Yours, > Linus Walleij >