Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2633125imm; Sun, 7 Oct 2018 08:21:02 -0700 (PDT) X-Google-Smtp-Source: ACcGV63Afpfgh9aIQBMh8iZOmbs1M2LuX9UlluJhcruW6by7u1hRmWH1oeB9qFZ8YTQq4mXMiOrE X-Received: by 2002:a65:610e:: with SMTP id z14-v6mr9504483pgu.138.1538925662024; Sun, 07 Oct 2018 08:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538925661; cv=none; d=google.com; s=arc-20160816; b=WBrQBRMw8JBhxm6LcEzTCZlM4VxLErImyGEhqlHXhLWeBQThDUlm+AycrPIDGjS/RT 6CCsqYbZoffvLJaKWljfGxj865CflwMbF0/Y6xAxC3IXGRNqERq14aD1uEnNcaFGIP1D WqRuHRhT6CTYGPLIuhdT9Lv5SmeVDDx+xK+F/6FWCKEZkJrePKuU6Y5iAaPUhDlMtG8/ FNMDrHI1PnWFkRqR3uhSLk0hEU0Lmz4W+pBaz7yTldmL2+eU6gDV33mq9XZA0YIptvSB iONzB1YfBtiHuP7tNy9u0pR4p6BfcZczf1H/cGYrwrCw+3C809n0sm6TrSKv6EHl81wU T8bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=pSbvbaa39uwMaBGuMI1IG2aHj+LfG9bQ6C1S4sDSjJM=; b=aqB2MsKbnaSx4sLe6ScZotCUCMoL7oU+L7HaAVqPlLdD4HFJwBdscRG0ho3zePT8UJ yYobSMhoJ+3I5Pac22Vz9oeKsIRLmT7zqRxSaG5BBLo6ILv8amLfC0doaJyxzwbR/hoV RZyYEZmNwvLfgMpylQafw5niql4MzVDYiYDjTqxUVZHDH5Um6gf9+2NQilP0KNpFCUSP zzHLNRnUxxwV2dvoaHeie/mKqKkQWgvWOVuW//EubTGQAdcgUrhJN7yC9vGRxm4x0dAv WL/If7Xyq4ghjiHqYDNDHiyFJh/ih6X1VSR3pZD1Ek9uJ8olhLda1Iih1xvFr2mF58+g yzfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y193-v6si13495880pgd.558.2018.10.07.08.20.46; Sun, 07 Oct 2018 08:21:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728407AbeJGW2F (ORCPT + 99 others); Sun, 7 Oct 2018 18:28:05 -0400 Received: from saturn.retrosnub.co.uk ([46.235.226.198]:50552 "EHLO saturn.retrosnub.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbeJGW2F (ORCPT ); Sun, 7 Oct 2018 18:28:05 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) by saturn.retrosnub.co.uk (Postfix; Retrosnub mail submission) with ESMTPSA id CAF554926E; Sun, 7 Oct 2018 16:20:23 +0100 (BST) Date: Sun, 7 Oct 2018 16:20:20 +0100 From: Jonathan Cameron To: Song Qiang Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org, mark.rutland@arm.com, himanshujha199640@gmail.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] dt-bindings: Add PNI RM3100 device tree binding. Message-ID: <20181007162020.6535767e@archlinux> In-Reply-To: <20181007161808.44a61d45@archlinux> References: <20180925031724.21399-1-songqiang1304521@gmail.com> <20181002143812.3661-1-songqiang1304521@gmail.com> <20181002143812.3661-3-songqiang1304521@gmail.com> <20181007161808.44a61d45@archlinux> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 7 Oct 2018 16:18:08 +0100 Jonathan Cameron wrote: > On Tue, 2 Oct 2018 22:38:11 +0800 > Song Qiang wrote: > > > Signed-off-by: Song Qiang > > --- > > .../bindings/iio/magnetometer/pni,rm3100.txt | 20 +++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt > > > > diff --git a/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt > > new file mode 100644 > > index 000000000000..4677690fc5d0 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt > > @@ -0,0 +1,20 @@ > > +* PNI RM3100 3-axis magnetometer sensor > > + > > +Required properties: > > + > > +- compatible : should be "pni,rm3100" > > +- reg : the I2C address or SPI chip select number of the sensor. > > + > > +Optional properties: > > + > > +- interrupts: data ready (DRDY) from the chip. > > + The interrupts can be triggered on rising edges. > From Phil's response this appears to be incorrect and > it's actually a level sensitive interrupt. > I haven't checked the data sheet to confirm this. > > That'll bring all sorts of pain if you have a host that can only > do edge sensitive so I'm hoping that's not true for you > (edge sensitive only interrupts on hosts are pretty unusual > though it cause me a lot of problems when I started out > with IIO years ago :( > > The docs aren't super clear on this. The subtlety is > whether there is a guaranteed 'low' time between reading the > data and it going high again due to another reading. This usually > only matters if you are running very quickly though so may be > fine here. > > This will only become relevant with continuous mode if you > add support for that later (I think!) I realised just after I sent this that I was being unclear. If you aren't doing continuous mode and hence have a fairly strong guarantee of a decent gap between reads, you may be able to get away with supporting either LEVEL or EDGE interrupts. In continuous mode, it is necessary to have a minimum low time for EDGE interrupts to work. Jonathan > > Jonathan > > > + > > +Example: > > + > > +rm3100: rm3100@20 { > > + compatible = "pni,rm3100"; > > + reg = <0x20>; > > + interrupt-parent = <&gpio0>; > > + interrupts = <4 IRQ_TYPE_EDGE_RISING>; > > +}; >