From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [PATCH 4/4 v4] iio: st_sensors: support open drain mode Date: Thu, 14 Apr 2016 10:36:53 +0200 Message-ID: References: <1460466079-15392-1-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rob Herring Cc: Jonathan Cameron , "linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Giuseppe Barba , Denis Ciocca List-Id: devicetree@vger.kernel.org On Wed, Apr 13, 2016 at 10:52 PM, Rob Herring wrote: > On Tue, Apr 12, 2016 at 8:01 AM, Linus Walleij wrote: >> Some types of ST Sensors can be connected to the same IRQ line >> as other peripherals using open drain. Add a device tree binding >> and a sensor data property to flip the right bit in the interrupt >> control register to enable open drain mode on the INT line. >> >> If the line is set to be open drain, also tag on IRQF_SHARED >> to the IRQ flags when requesting the interrupt, as the whole >> point of using open drain interrupt lines is to share them with >> more than one peripheral (wire-or). >> >> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> Cc: Giuseppe Barba >> Cc: Denis Ciocca >> Cc: Rob Herring >> Signed-off-by: Linus Walleij >> --- >> ChangeLog v3->v4: >> - Rename DT bool property st,int-pin-open-drain to int-pin-open-drain >> - Rob Herring ACKed st,int-pin-open-drain but not including his ACK >> on this even though it's close > > We already have st,irq-open-drain, gpio-open-drain, linux,open-drain > and drive-open-drain (from pinctrl). > > If we want something common, then it should probably be part of > interrupt bindings, not something common to IIO. I could agree to use the pin control drive-open-drain; It has very little to do with the interrupt bindings, there are so many interrupt lines in the world, the fact that some of them go over open drain rails doesn't matter to the interrupt-controller devices, it needs to be below them. I will resubmit using the pin control binding. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f179.google.com ([209.85.214.179]:35960 "EHLO mail-ob0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091AbcDNIgy (ORCPT ); Thu, 14 Apr 2016 04:36:54 -0400 Received: by mail-ob0-f179.google.com with SMTP id j9so45269888obd.3 for ; Thu, 14 Apr 2016 01:36:54 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1460466079-15392-1-git-send-email-linus.walleij@linaro.org> Date: Thu, 14 Apr 2016 10:36:53 +0200 Message-ID: Subject: Re: [PATCH 4/4 v4] iio: st_sensors: support open drain mode From: Linus Walleij To: Rob Herring Cc: Jonathan Cameron , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , Giuseppe Barba , Denis Ciocca Content-Type: text/plain; charset=UTF-8 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Wed, Apr 13, 2016 at 10:52 PM, Rob Herring wrote: > On Tue, Apr 12, 2016 at 8:01 AM, Linus Walleij wrote: >> Some types of ST Sensors can be connected to the same IRQ line >> as other peripherals using open drain. Add a device tree binding >> and a sensor data property to flip the right bit in the interrupt >> control register to enable open drain mode on the INT line. >> >> If the line is set to be open drain, also tag on IRQF_SHARED >> to the IRQ flags when requesting the interrupt, as the whole >> point of using open drain interrupt lines is to share them with >> more than one peripheral (wire-or). >> >> Cc: devicetree@vger.kernel.org >> Cc: Giuseppe Barba >> Cc: Denis Ciocca >> Cc: Rob Herring >> Signed-off-by: Linus Walleij >> --- >> ChangeLog v3->v4: >> - Rename DT bool property st,int-pin-open-drain to int-pin-open-drain >> - Rob Herring ACKed st,int-pin-open-drain but not including his ACK >> on this even though it's close > > We already have st,irq-open-drain, gpio-open-drain, linux,open-drain > and drive-open-drain (from pinctrl). > > If we want something common, then it should probably be part of > interrupt bindings, not something common to IIO. I could agree to use the pin control drive-open-drain; It has very little to do with the interrupt bindings, there are so many interrupt lines in the world, the fact that some of them go over open drain rails doesn't matter to the interrupt-controller devices, it needs to be below them. I will resubmit using the pin control binding. Yours, Linus Walleij