Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756289AbcJ3Nfa (ORCPT ); Sun, 30 Oct 2016 09:35:30 -0400 Received: from saturn.retrosnub.co.uk ([178.18.118.26]:41999 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755949AbcJ3Nf3 (ORCPT ); Sun, 30 Oct 2016 09:35:29 -0400 Subject: Re: [PATCH v3 7/8] dt-bindings: iio: document envelope-detector bindings To: Peter Rosin , linux-kernel@vger.kernel.org References: <1477262381-7800-1-git-send-email-peda@axentia.se> <1477262381-7800-8-git-send-email-peda@axentia.se> Cc: Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Mark Rutland , linux-iio@vger.kernel.org, devicetree@vger.kernel.org From: Jonathan Cameron Message-ID: <0f054fa3-5b38-ce19-d9b6-d5f862f43ee2@kernel.org> Date: Sun, 30 Oct 2016 13:35:26 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <1477262381-7800-8-git-send-email-peda@axentia.se> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3068 Lines: 92 On 23/10/16 23:39, Peter Rosin wrote: > Signed-off-by: Peter Rosin I'm happy with this, but again it's odd enough I'd like some input from a device tree bindings maintainer. Thanks, Jonathan > --- > .../bindings/iio/adc/envelope-detector.txt | 54 ++++++++++++++++++++++ > MAINTAINERS | 6 +++ > 2 files changed, 60 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/envelope-detector.txt > > diff --git a/Documentation/devicetree/bindings/iio/adc/envelope-detector.txt b/Documentation/devicetree/bindings/iio/adc/envelope-detector.txt > new file mode 100644 > index 000000000000..27544bdd4478 > --- /dev/null > +++ b/Documentation/devicetree/bindings/iio/adc/envelope-detector.txt > @@ -0,0 +1,54 @@ > +Bindings for ADC envelope detector using a DAC and a comparator > + > +The DAC is used to find the peak level of an alternating voltage input > +signal by a binary search using the output of a comparator wired to > +an interrupt pin. Like so: > + _ > + | \ > + input +------>-------|+ \ > + | \ > + .-------. | }---. > + | | | / | > + | dac|-->--|- / | > + | | |_/ | > + | | | > + | | | > + | irq|------<-------' > + | | > + '-------' > + > +Required properties: > +- compatible: Should be "axentia,tse850-envelope-detector" > +- io-channels: Channel node of the dac to be used for comparator input. > +- io-channel-names: Should be "dac". > +- interrupt specification for one client interrupt, > + see ../../interrupt-controller/interrupts.txt for details. > +- interrupt-names: Should be "comp". > + > +Example: > + > + &i2c { > + dpot: mcp4651-104@28 { > + compatible = "microchip,mcp4651-104"; > + reg = <0x28>; > + #io-channel-cells = <1>; > + }; > + }; > + > + dac: dac { > + compatible = "dpot-dac"; > + vref-supply = <®_3v3>; > + io-channels = <&dpot 0>; > + io-channel-names = "dpot"; > + #io-channel-cells = <1>; > + }; > + > + envelope-detector { > + compatible = "axentia,tse850-envelope-detector"; > + io-channels = <&dac 0>; > + io-channel-names = "dac"; > + > + interrupt-parent = <&gpio>; > + interrupts = <3 IRQ_TYPE_EDGE_FALLING>; > + interrupt-names = "comp"; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index d7375f45ff0f..fca35d16037d 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -6119,6 +6119,12 @@ F: Documentation/ABI/testing/sysfs-bus-iio-dac-dpot-dac > F: Documentation/devicetree/bindings/iio/dac/dpot-dac.txt > F: drivers/iio/dac/dpot-dac.c > > +IIO ENVELOPE DETECTOR > +M: Peter Rosin > +L: linux-iio@vger.kernel.org > +S: Maintained > +F: Documentation/devicetree/bindings/iio/adc/envelope-detector.txt > + > IIO SUBSYSTEM AND DRIVERS > M: Jonathan Cameron > R: Hartmut Knaack >