From: Jonathan Cameron <jic23@kernel.org>
To: Song Qiang <songqiang1304521@gmail.com>
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.
Date: Sat, 22 Sep 2018 16:44:15 +0100 [thread overview]
Message-ID: <20180922164415.67a55cb2@archlinux> (raw)
In-Reply-To: <20180922152621.GA953@Eros>
On Sat, 22 Sep 2018 23:28:04 +0800
Song Qiang <songqiang1304521@gmail.com> 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 <songqiang1304521@gmail.com> 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 <songqiang1304521@gmail.com>
> > 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 <songqiang1304521@gmail.com>");
> > > +MODULE_DESCRIPTION("ST vl53l0x ToF ranging sensor driver");
> > > +MODULE_LICENSE("GPL v2");
> >
prev parent reply other threads:[~2018-09-22 15:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-18 8:24 [PATCH v6 1/2] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor Song Qiang
2018-09-18 8:24 ` [PATCH v6 2/2] iio: proximity: vl53l0x: add interrupt support Song Qiang
2018-09-22 15:05 ` Jonathan Cameron
2018-09-26 22:46 ` Rob Herring
2018-09-28 9:36 ` Song Qiang
2018-09-28 23:52 ` Rob Herring
2018-09-29 11:10 ` Jonathan Cameron
2018-09-29 23:49 ` Rob Herring
2018-09-30 15:20 ` Jonathan Cameron
2018-10-01 3:58 ` Song Qiang
2018-10-01 18:44 ` Jonathan Cameron
2018-09-19 18:58 ` [PATCH v6 1/2] iio: proximity: Add driver support for ST's VL53L0X ToF ranging sensor Sasha Levin
2018-09-20 8:41 ` Jonathan Cameron
2018-09-21 14:56 ` Sasha Levin
2018-09-22 14:46 ` Jonathan Cameron
2018-09-22 14:56 ` Himanshu Jha
2018-09-22 15:12 ` Jonathan Cameron
2018-09-22 15:28 ` Song Qiang
2018-09-22 15:44 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180922164415.67a55cb2@archlinux \
--to=jic23@kernel.org \
--cc=ak@it-klinger.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matt.ranostay@konsulko.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
--cc=songqiang1304521@gmail.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).