Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp688242imm; Sat, 22 Sep 2018 08:29:22 -0700 (PDT) X-Google-Smtp-Source: ACcGV61EIfqKkae/RrcRKKG37Bq9gYirmLncUzYjGkxLg2kasNRIHF3QCkpL75uZrmjfSyzXWx0u X-Received: by 2002:a17:902:ba95:: with SMTP id k21-v6mr3106626pls.38.1537630162625; Sat, 22 Sep 2018 08:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537630162; cv=none; d=google.com; s=arc-20160816; b=zv3oQfqR2NRXxyuOgBZGA+AQipTM0Kha/lB8rYrGivHeXexa/C52Zo2eK7M5UjrgHw cc8YUYRr3cYcaxed0bt/zYQcyA4SaUn5wiqEI3CPw46awObV3fdKxlwc789LIYggK/5I OgZlXmBmCum2YhnYanSkx3nrN9Ptw7ihcafWJRVVsLjpDgWrmFNgQ6y90JYlmbeVyhuc fn63k9vyFwEjMI2PwPJDdmKF9jzOGX7sT/khLfMFbTxLBeRdOg0wySTzLzaOyo82+jrq tf/YQ69nx3nR1P28WZpYgXpDLf1uIVByhYUDi+BAOXTxhJtgI084TopPd+YHaCuxvow6 XuwQ== 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:dkim-signature; bh=6t3JV44tEgyRy4YvyZjDyEBMQeFXr+J6QlvBu/7eJeM=; b=DCvyoS0Sq6j1EUmXHSvkGDkuVFN8KF8564hdX9ei+uOIBc/rKwxSEfYcob+Phxc01/ sJm+joxpzb6srfNm8Yyb5bxgwc0rWiw/psD8oiE6SphCF6KcNOGhSKjFW8qTKON5F2Ud gLyYNqvDhyQQh5ydaU5fbQeMVwtUTQo4ZP9oxhW+1Qn4jHzKTOewK13Go6k0dlHhE2tN tbv/bdBrVoqgjEmAe1ne+N75BBkP8nvdLeMO7CRvIGn7eDQS1pRYefrnOt7wXTUFKq2J mFegiiNnHXK1MtIEqO7Od5KRCYGWKis2GKXW93U6KGrznLqwvkJLoKMrUflYB0SSZyyU IHnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PFShKLh2; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si31313098pfe.66.2018.09.22.08.28.36; Sat, 22 Sep 2018 08:29:22 -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=@gmail.com header.s=20161025 header.b=PFShKLh2; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728993AbeIVVWL (ORCPT + 99 others); Sat, 22 Sep 2018 17:22:11 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44458 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727013AbeIVVWL (ORCPT ); Sat, 22 Sep 2018 17:22:11 -0400 Received: by mail-pf1-f193.google.com with SMTP id k21-v6so7238033pff.11; Sat, 22 Sep 2018 08:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=6t3JV44tEgyRy4YvyZjDyEBMQeFXr+J6QlvBu/7eJeM=; b=PFShKLh28Yp5lTDS7Rge2insATc+e9+mRl7aTahlbn9azOgYLabwlZzuKn99HG2+a8 M0LtOn5hpQCxbY5xf0P2fO4iZYYLN7pQ/k1ruVvbmX7lcvNNyL6acoH+69e+9v4TYkgf ks2dy2DrJMZ3sYH3V6+GF31WUDfTUpLe3ElQsuHHWj1Foyq2MxLGe28pZZVHAHWZ+me7 K9RpeOBbymAv4T4jcZ5ycx1KtjZHOvDvdx1+0ENAEfCyajh5PK5pcFTz4ZrLucUy7XnC xFp9ROOnMXD5WiIvN11ivpYqUwy7jyIyKGdtJ3URHL5T6OCYwDVr3GLraP2wijZALFYa 71iw== 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=6t3JV44tEgyRy4YvyZjDyEBMQeFXr+J6QlvBu/7eJeM=; b=Qa/9HCPc5WocrKYsnPSTDHCx/IRM6loGIpW3e6pdkVXXOoYPiGHEG1Y2cHKj5iQwv7 dXAe2e0fWFM+A01CcwjoPg8/xMVi+jkmX+FMuGr3rcAdPVgpYY476BZ6bz4ZB6njHPtp phbclRwqpOCc5QEP4lKC1O5yTAOL4v/NtMj6vpii433G9UInqAtSMoMnMaRq3QZ5p8Jn SLfjY7o75Qdb1nPoPBzr24JaFUakKgxRd7X4u9RsyCAy2SJ3xkHqfEQJixNIoHkGPPr7 r+qflyVdt+Jm/AxcEh9EFOHbUUJcI2xWJ1FU2m2N5DYLPew4ijT4TQmM3l0KVNN2sTCs BolA== X-Gm-Message-State: ABuFfohyx6aZd8tEk5nKV5dhjHajDV274tIBhL9Xs3asQeLpkuvtfSAS ijemkRV4rAO/U0E9uDr2KuA= X-Received: by 2002:a63:d048:: with SMTP id s8-v6mr2643806pgi.311.1537630093545; Sat, 22 Sep 2018 08:28:13 -0700 (PDT) Received: from Eros (104.176.229.35.bc.googleusercontent.com. [35.229.176.104]) by smtp.gmail.com with ESMTPSA id z5-v6sm38629074pfh.83.2018.09.22.08.28.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Sep 2018 08:28:13 -0700 (PDT) Date: Sat, 22 Sep 2018 23:28:04 +0800 From: Song Qiang To: Jonathan Cameron 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: <20180922152621.GA953@Eros> References: <20180918082422.13050-1-songqiang1304521@gmail.com> <20180922154658.752f2fbf@archlinux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180922154658.752f2fbf@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 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! 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"); >