Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3604942imm; Sun, 16 Sep 2018 23:19:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaRJz9pmJtXvzhDwOGsyF+XLpCzNi+wKVEYdmabMKodUVx3Liwc2nku/Ou/naobo5XRkXpH X-Received: by 2002:a63:9246:: with SMTP id s6-v6mr20101188pgn.141.1537165196199; Sun, 16 Sep 2018 23:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537165196; cv=none; d=google.com; s=arc-20160816; b=i5siii2PnYMcagbVPZORqyOoVWvCw/cRC0EalwTMVpViCaoInin7vE1RC9/s8nzZem yQIrTCt/J511+OBtEjtVsgoIwlk0ER+nDrFf18r/BRrs7fneXB21DlMUuvgxBHaCu52Y vD6x3hT0/e0sZp1ntmYwHuPHY4kFOiobCmBb20R5QaD6eyutlH8/4yBOIPzC1JAsJa3H KGErNk7DSIdQeiQirfDK2qyU+0kul7Vvk+LgXRMrmKcSjPb4cHRvuoPbzPnMcqavQBCf 16ctSo6nrZfDvHWoyM+PCS+lC0v+5NbqcumeZekt+V/4V0/9FB/v78SsQdbmcDYT22sN B+Jw== 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=Ykf9hCBCdOANlmVkJNyU6o9UBWU4QyPWO+4KoVPuiMU=; b=eNNerT+p2if1guU0jCTvWXyICrYVfWRyWW60iXSssKZdK77u3JiUxAPbxANhLQm9mZ tdGM1HD64weJywjeiPq4kgjeC14VPzGzbypLA1D3PGSNuUmUeA0UFj6HZwBf+RNzhiKb 00TdYIHWzNotXEs8ED/ku/Yqf6CA7LuBwdq/PU8aYGHXS2xDNcMsu16Zh1E4jsttJ6MJ +R0uDjRunJz+IFGydQdv0uLEHm5+3tYrle2Uc8fbReI0zl2IteytVda0EecYRGqPErci hsw+fp7Btfcuqsn5PuNoW0O0rA/B6mWWPuRWSwBXKo8r3wmwKhRfGSRYzhTYQw31hJ/t /XfA== 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 q12-v6si15903573pfc.349.2018.09.16.23.19.40; Sun, 16 Sep 2018 23:19:56 -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 S1728134AbeIQLp3 (ORCPT + 99 others); Mon, 17 Sep 2018 07:45:29 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:51495 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726078AbeIQLp3 (ORCPT ); Mon, 17 Sep 2018 07:45:29 -0400 Received: by mail-it0-f65.google.com with SMTP id e14-v6so9667891itf.1; Sun, 16 Sep 2018 23:19:35 -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=Ykf9hCBCdOANlmVkJNyU6o9UBWU4QyPWO+4KoVPuiMU=; b=AQlyRhIAJPJBwsnZCI+Hl76GF5Y0+aZtFDGozRxiNrSAoemW0/STGbU//s5dyZLRE9 3uKUpl2jqNPDI7h2yOoywObIosVOo731ClZdIL3aU7t8SEfCPXBj+2uFOTiblIHhNB/+ 5jh/lLk0jAtpGENVzE8ptxWVlGPWQZhuZNJgOvNVuqUFKe4Od239CGd8yd9Dcg5oNhay bxB1kKH2sRMmBHKORucbIZ74I4kZhIcX9gXFucz4Cv23Adbf0tIExYRE80dWs1qMhC8X By1H+QkiHHFuJoQZKnSFe3yCDZLdLjVB48hX0SCvsmOOjDJ4QatXCwwz2opLSPgrXGW1 wxRg== X-Gm-Message-State: APzg51AenU3dGmVT3tZ6vxqRVCT3kqAQcARC7Qr6ee9x9YHM574rpxj+ eM+kIn4f5tx/HzVbAN5GxEXZf9TZjQ== X-Received: by 2002:a24:27d5:: with SMTP id g204-v6mr11780432ita.47.1537165174796; Sun, 16 Sep 2018 23:19:34 -0700 (PDT) Received: from localhost ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id l186-v6sm2726339ith.42.2018.09.16.23.19.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 16 Sep 2018 23:19:34 -0700 (PDT) Date: Mon, 17 Sep 2018 02:19:33 -0400 From: Rob Herring To: Song Qiang Cc: jic23@kernel.org, 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, himanshujha199640@gmail.com, Song Qiang Subject: Re: [PATCH v5] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor. Message-ID: <20180917061933.GA15262@bogus> References: <20180915095752.8116-1-songqiang.1304521@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180915095752.8116-1-songqiang.1304521@gmail.com> 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 15, 2018 at 05:57:52PM +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. > This version of driver supports only one-shot mode, and it can be > tested with reading from > /sys/bus/iio/devices/iio:deviceX/in_distance_raw > > Signed-off-by: Song Qiang checkpatch.pl complains that the author and signoff emails don't match. I think gmail ignores '.' in email names, but better to be consistent IMO. > --- > Changes in v5: > - Correct some spell problems. > - Change tries-- to --tries to fix the count error. > - Add MODULE_DEVICE_TABLE(). > - Add some comments. > > Changes in v4: > - Add datasheet link, default i2c address and TODO list. > - Make capitalization of defines consistent. > - Replace i2c_transfer() with i2c_smbus_read_i2c_block_data(). > - Remove IIO_CHAN_SOFT_TIMESTAMP() since no buffer/trigger > support. > - Add information to MAINTAINERS. > > Changes in v3: > - Recover ST's copyright. > - Clean up indio_dev member in vl53l0x_data struct since it's > useless now. > - Replace __le16_to_cpu() with le16_to_cpu(). > - Remove the iio_device_{claim|release}_direct_mode() since it's > only needed when we use buffered mode. > - Clean up some coding style problems. > > Changes in v2: > - Clean up the register table. > - Sort header files declarations. > - Replace some bit definations with GENMASK() and BIT(). > - Clean up some code and comments that's useless for now. > - Change the order of some the definations of some variables to reversed > xmas tree order. > - Using do...while() rather while and check. > - Replace pr_err() with dev_err(). > - Remove device id declaration since we recommend to use DT. > - Remove .owner = THIS_MODULE. > - Replace probe() with probe_new() hook. > - Remove IIO_BUFFER and IIO_TRIGGERED_BUFFER dependences. > - Change the driver module name to vl53l0x-i2c. > - Align all the parameters if they are in the same function with open > parentheses. > - Replace iio_device_register() with devm_iio_device_register > for better resource management. > - Remove the vl53l0x_remove() since it's not needed. > - Remove dev_set_drvdata() since it's already setted above. > > .../bindings/iio/proximity/vl53l0x.txt | 12 ++ > MAINTAINERS | 7 + Otherwise, Reviewed-by: Rob Herring > drivers/iio/proximity/Kconfig | 11 ++ > drivers/iio/proximity/Makefile | 2 + > drivers/iio/proximity/vl53l0x-i2c.c | 180 ++++++++++++++++++ > 5 files changed, 212 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt > create mode 100644 drivers/iio/proximity/vl53l0x-i2c.c