Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp699911imm; Sat, 22 Sep 2018 08:44:51 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda6lk9OtgL7WFJJf+lDeXhAGRxkb0zabvtcETaIu5Fl+cmOOZ78y5aDiULouaJrpB9ArEah X-Received: by 2002:a62:c218:: with SMTP id l24-v6mr2986408pfg.185.1537631091269; Sat, 22 Sep 2018 08:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537631091; cv=none; d=google.com; s=arc-20160816; b=x4/uGn1wiF+ANuOXX1wvtNwU9AiMYxCqQEVS4xImfI69v8EnAz4J60dVm4T7MWdZGO JNVDOPFhARwdIK8rnMfZy6r6SyPl0vyOnTMlSUqlG/oT3FabxpjaG7YdPUPbyz00rVV0 gzl4m80dFIPSe/R8FQH5YMVqlzl4iTLzvO74SClzZaWgkqQz5DAsQJRUyTkr9XJu03tG +X2anEIs2oqkN/2Hi/2G3jdDseItRdrvo0vUwPDZ42gRApVqg2QuJzwdH/82+4Pj1KPN G9bEpjJOKHozfAQuj5jpjl1XLGJKi1qO9up/Nt360n15XpRr9ZvqMVEN6JSUxsm7ckoD bT8A== 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 :dkim-signature; bh=vqbyegHh5cwXxB7Z/RWlTwetcQksKOw4csNQ5VgcrM4=; b=hwQhb/BY6nNuEGUdxplqbxndPeqJEP225y/2QCay4wJNwiMK/44cJC0L1zMGYT7HNf 0EPY0CSS/CV0ZfVEhe8CEbO8xDBFi9XRq4JK8hZYyJ4ngdv2iEePK8A01ljcLYdUM/9/ AqGkPT/Bwq26KfOy5Un832qgPBxiJd1N1m/t4bfgDFy5WhJt7z4uQNCnml8z5Qo52/6w tpPTny2JeS3WdwQ0XjdJMTR/ZtmulvsRQS+W6iHgphg+kjmkr/skXUbEjtkp5DS3EJDx Yukwk0hgF8dfZLwsjtiQnvQHhdUdDrwPAEZnWhcN2go4c3uBuIR5EmXeiJ/L5oi1me4N eoiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=uojjWvdc; 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=pass (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 31-v6si31631396pld.145.2018.09.22.08.44.35; Sat, 22 Sep 2018 08:44:51 -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; dkim=pass header.i=@kernel.org header.s=default header.b=uojjWvdc; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728778AbeIVViV (ORCPT + 99 others); Sat, 22 Sep 2018 17:38:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:43648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbeIVViV (ORCPT ); Sat, 22 Sep 2018 17:38:21 -0400 Received: from archlinux (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5BE86206B7; Sat, 22 Sep 2018 15:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537631060; bh=q4PX/MII+KI/bLLnq93ambLvI7oQ56v7d1lW4fGti8w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uojjWvdc/6egO6BEBpY4W/Xfi+F0ttxrOy8jneFiG9UorWpU+/JTA5wqNFXPGhfzs aXRVZdBdHO5WG5U7QsR4z92lMYsrO3MtjXL6SbBKjHrsw+9/Qjlij2AN8o/ZRsLHxF YNI3eQnIputrLW3zhP8p8k9EVBGrntkyyw1Aalyo= Date: Sat, 22 Sep 2018 16:44:15 +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, 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 1/2] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor. Message-ID: <20180922164415.67a55cb2@archlinux> In-Reply-To: <20180922152621.GA953@Eros> References: <20180918082422.13050-1-songqiang1304521@gmail.com> <20180922154658.752f2fbf@archlinux> <20180922152621.GA953@Eros> 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 Sat, 22 Sep 2018 23:28:04 +0800 Song Qiang wrote: > On Sat, Sep 22, 2018 at 03:46:58PM +0100, Jonathan Cameron wrote: > > On Tue, 18 Sep 2018 16:24:21 +0800 > > Song Qiang wrote: > > > > > This driver was originally written by ST in 2016 as a misc input device > > > driver, and hasn't been maintained for a long time. I grabbed some code > > > from it's API and reformed it into an iio proximity device driver. > > > This version of driver uses i2c bus to talk to the sensor and > > > polling for measuring completes, so no irq line is needed. > > > It can be tested with reading from > > > /sys/bus/iio/devices/iio:deviceX/in_distance_input > > > > > > Signed-off-by: Song Qiang > > There are a few bits and bobs in here, but as they are all minor and > > one at least was me giving you wrong advise, I've fixed it up. > > > > Please check I haven't made a mess of it! > > > > Applied with changes to the togreg branch of iio.git and pushed out > > as testing (where it should be visible now) for the autobuilders to > > play with it. > > > > Thanks, > > > > Jonathan > > > --- > > > > + indio_dev->name = "vl53l0x"; > > > + indio_dev->info = &vl53l0x_info; > > > + indio_dev->channels = vl53l0x_channels; > > > + indio_dev->num_channels = ARRAY_SIZE(vl53l0x_channels); > > > + indio_dev->modes = INDIO_DIRECT_MODE; > > > + > > > + return devm_iio_device_register(&client->dev, indio_dev); > > > +} > > > + > > > +static const struct of_device_id st_vl53l0x_dt_match[] = { > > > + { .compatible = "st,vl53l0x-i2c", }, > > > > Ah, this suffers from the same thing that was picked up in a driver > > you sent later in the week. No need to have -i2c in the compatible > > as this is clear from the bus type. > > > > (I might just fix this up). > > > > Hi Jonathan, > > Sorry for the newbie mistakes you and Himanshu pointed out, I'm just > writing them down on my little checklist! > I just checked the code, found that this compatible string was not > getting corrected in the DT binding doc file, sorry that you have > to help correct my mistakes, thanks a lot! Fixed up (and this was my mistake - we all make them - that's what review is for!) Thanks, Jonathan > > yours, > Song Qiang > > > > + { } > > > +}; > > > +MODULE_DEVICE_TABLE(of, st_vl53l0x_dt_match); > > > + > > > +static struct i2c_driver vl53l0x_driver = { > > > + .driver = { > > > + .name = "vl53l0x-i2c", > > > + .of_match_table = st_vl53l0x_dt_match, > > > + }, > > > + .probe_new = vl53l0x_probe, > > > +}; > > > +module_i2c_driver(vl53l0x_driver); > > > + > > > +MODULE_AUTHOR("Song Qiang "); > > > +MODULE_DESCRIPTION("ST vl53l0x ToF ranging sensor driver"); > > > +MODULE_LICENSE("GPL v2"); > >