Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1315361imm; Wed, 26 Sep 2018 15:46:41 -0700 (PDT) X-Google-Smtp-Source: ACcGV61E9IhEz/31EtFzJTE2JzJoi/4q7JmSgqafzAYAMCYh5DDueF4qP/ThlLtu2Ul7rAcY98yJ X-Received: by 2002:a62:ff09:: with SMTP id b9-v6mr8248655pfn.46.1538002001388; Wed, 26 Sep 2018 15:46:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538002001; cv=none; d=google.com; s=arc-20160816; b=hOfN/gger+ni0jLgs0nSPy6viUD60MbC43oyJQRACN8qNljnBcw0bfjHklNW+yTyNI VfoTWS62qbPkTPGuA8ppJGXAwTdBQ9t5BSUxj2TD94NbHBt+76zuUAOt6UC1De7di314 ZLPS40QOVb7LClTuySwiMHLDeMMEQJ4FpTiAYdtQiQzSbzTubfBqiC7kNKFAhT1ZiJ/Q pT4hci5BSYA2gFup8Wi5vAgg0sFQQrpaCneHUHXZ5CMVXMm8xVmq7cViYx2M7dMuIG5t k68N0UBb2c8B/9weNf7cVzUfSrCU07R4Pjmmbqp3DqmCtJxoOFLrojxeatr/I65x9gIw Na/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Dzdy6iB+uNOtlAAiCxj/SDaQUvUK5Vmaa2dsmdoDU6s=; b=G9uY6oKjTjAc5bWHZzzlQ1cP1jnK+g0GNjfpVHhh6OyX5/7E6sX4c/gQI44rVz5Ezy nisOhTX1qTgNvpPX7c81mxn86cs67IPzmml/U0W7VOq8/CwNHrA1W6UPiScJGgt/jkgR BUK0Qa8IRoI22bV1s6JOJbkfXh4AVKllqfpferF+kmu/sM5YVEUADDtRojcDTt674fuD GB7D7HYVqpjRSgMNZEl3Cpi/BLk6nx1JvLTdFEZygrDtddVXvcAWK+ItQh1n/aV+uZ3G 8inPKXPZzjUKYMZduUGcs8OyqkUNL2mMPuVNH68IXat5GkqLuW+w8y9SW0rBFTlBLhRd 2UHA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si204614pld.277.2018.09.26.15.46.25; Wed, 26 Sep 2018 15:46:41 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726560AbeI0FBc (ORCPT + 99 others); Thu, 27 Sep 2018 01:01:32 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:34307 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbeI0FBc (ORCPT ); Thu, 27 Sep 2018 01:01:32 -0400 Received: by mail-oi1-f196.google.com with SMTP id 13-v6so575850ois.1; Wed, 26 Sep 2018 15:46:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Dzdy6iB+uNOtlAAiCxj/SDaQUvUK5Vmaa2dsmdoDU6s=; b=nx+8cNOKsbQxOAqF28yUYylY9SYxmdQZvyS+uzMc61WY7lsrkc3m+M9HdeIimaad3O 5WE+FeI+WlKoskJBp+8iJ6rjEZhqQALJCTjm8TvuWrOz847LFHbdJqe7HBdk4SpyfdyT o6fj0mTjn9LNlsJdZcDgoY7puDBfPbZQqIvXPi8IKRNB5W5Es3oKC70YZQu0MWtp3+rk to0kY7CRpW8EvwXvLtCbuGOymMQ6bF0wWNSpQUQMRTXIV4GeQYWQF5cwejnQCq0kXpsD 9BppthlrRG5tlNf46VubWMO7y/cJnLhq/vGlsEiQJBCC/6GxWebtkJOWBgTbUYaxQ0Qg P9IA== X-Gm-Message-State: ABuFfogWYKpZYfS5QzsERKHEVbY6nZ3MpLZl5B5cSehe73prPZ0SW0Vs 1XQNUZh/81jXUim7ZkorPQ== X-Received: by 2002:a54:468e:: with SMTP id k14-v6mr1899602oic.27.1538001979613; Wed, 26 Sep 2018 15:46:19 -0700 (PDT) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id u21-v6sm125213oie.22.2018.09.26.15.46.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Sep 2018 15:46:19 -0700 (PDT) Date: Wed, 26 Sep 2018 17:46:18 -0500 From: Rob Herring To: Jonathan Cameron Cc: Song Qiang , knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, mark.rutland@arm.com, andriy.shevchenko@linux.intel.com, matt.ranostay@konsulko.com, tglx@linutronix.de, ak@it-klinger.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v6 2/2] iio: proximity: vl53l0x: add interrupt support Message-ID: <20180926224618.GA32126@bogus> References: <20180918082422.13050-1-songqiang1304521@gmail.com> <20180918082422.13050-2-songqiang1304521@gmail.com> <20180922160523.16b399fc@archlinux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180922160523.16b399fc@archlinux> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 22, 2018 at 04:05:23PM +0100, Jonathan Cameron wrote: > On Tue, 18 Sep 2018 16:24:22 +0800 > Song Qiang wrote: > > > The first version of this driver issues a measuring request and polling > > for a status register in the device for measuring completes. > > vl53l0x support configuring GPIO1 on it to generate interrupt to > > indicate that new measurement is ready. This patch adds support for > > using this mechanisim to reduce cpu cost. > > > > Signed-off-by: Song Qiang > Hi Song. > > Looks correct in principal but a few things to tidy up before > this is ready to apply. > > Also we have an unrelated change in here to check the devices ID. > That should be in it's own patch. > > Thanks, > > Jonathan > > --- > > .../bindings/iio/proximity/vl53l0x.txt | 14 +- This should have been split with the complete binding in one patch rather than piecemeal driver feature by feature. > > drivers/iio/proximity/vl53l0x-i2c.c | 135 +++++++++++++++--- > > 2 files changed, 129 insertions(+), 20 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt b/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt > > index ab9a9539fec4..40290f8dd70f 100644 > > --- a/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt > > +++ b/Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt > > @@ -4,9 +4,21 @@ Required properties: > > - compatible: must be "st,vl53l0x-i2c" Is there more than one interface on this device, such as SPI? If not, then '-i2c' should be dropped. > > - reg: i2c address where to find the device > > > > +Optional properties: > > + - interrupts : Interrupt line receiving GPIO1's measuring complete > > + output, supports IRQ_TYPE_EDGE_FALLING only. > > + > > + Refer to interrupt-controller/interrupts.txt for generic > > + interrupt client node bindings. > > + > > Example: > > > > vl53l0x@29 { > > + pinctrl-names = "default"; > > + pinctrl-0 = <&vl53l0x_pins>; > > + > Please drop this from the example. This is board specific rather than > being generally required. > > > compatible = "st,vl53l0x-i2c"; > > reg = <0x29>; > > -}; > > + interrupt-parent = <&gpio3>; > > + interrupts = <17 IRQ_TYPE_EDGE_FALLING>; > > +}