From: Jonathan Cameron <jic23@kernel.org>
To: Rob Herring <robh@kernel.org>
Cc: Song Qiang <songqiang1304521@gmail.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
Mark Rutland <mark.rutland@arm.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Matt Ranostay <matt.ranostay@konsulko.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andreas Klinger <ak@it-klinger.de>,
linux-iio@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v6 2/2] iio: proximity: vl53l0x: add interrupt support
Date: Sat, 29 Sep 2018 12:10:34 +0100 [thread overview]
Message-ID: <20180929121034.6c5e5826@archlinux> (raw)
In-Reply-To: <CAL_JsqLpNiGdK9hWTGWZwgbgRr8DNF=XvKGUx=oS2jTJ61yhFg@mail.gmail.com>
On Fri, 28 Sep 2018 18:52:13 -0500
Rob Herring <robh@kernel.org> wrote:
> On Fri, Sep 28, 2018 at 4:36 AM Song Qiang <songqiang1304521@gmail.com> wrote:
> >
> > On Wed, Sep 26, 2018 at 05:46:18PM -0500, Rob Herring wrote:
> > > On Sat, Sep 22, 2018 at 04:05:23PM +0100, Jonathan Cameron wrote:
> > > > On Tue, 18 Sep 2018 16:24:22 +0800
> > > > Song Qiang <songqiang1304521@gmail.com> 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 <songqiang1304521@gmail.com>
> > > > 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.
> > >
> >
> > Hi Rob,
Hi Rob, Song,
> >
> > A few days ago when I was submitting this driver, I didn't do it very
> > well, the function of this driver is limited. I added interrupt support
> > the next day after you acked my first patch. I thought it's not polite
> > to add something after someone acked that patch, so I send the interrupt
> > support as a second patch. The first patch is merged to togreg now, but
> > this doesn't. I don't know when can I add new functions to the code that
> > just merged to togreg branch, could you offer some suggestions?
>
> You just needed to state why you didn't add a ack. But really, just
> don't send things except as RFC until they are "done".
The RFC bit actually disagree on. This driver could be considered 'done'
with just patch 1. The driver worked, it was useful. When the early
versions of that patch came out Song had no idea how much work it would
be to add interrupt support. As it turns out it was simple - it often isn't :(
>
> What to do next depends on Jonathan and whether he wants a follow-up
> patch or he will drop the first one.
Yeah. I should have picked up on the binding in the second patch and merged
it. I'd seen the first patch a few times before so was happy with it and
applied before actually looking at the second.
If they had come in separate series in my view the partial binding then
extend with 'optional' elements is fine. The number of times I've discovered
issues with documentation of hardware that would have made any binding written
from the docs wrong is non trivial. So in my view it is always a gamble to
write bindings until you have tested they work. I have not problem with
people who are confident and want to add them from the start though.
Obviously this only works for optional elements.
So follow up patch for 'optional' stuff is fine by me. The only real
issue to my mind here is that they were in the same series, so we should
have seen a separate precursor patch giving the binding for all of it.
>
> > > > > 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.
> > >
> >
> > Yes, there is a CCI(Camera Control Interface) for communication.
>
> Isn't CCI just a subset of I2C? I should clarify my question is
> whether there's more than 1 mutually exclusive control interface (as
> many devices have control and data interfaces) where you could have 2
> different drivers. A common example are devices with I2C and SPI
> interfaces.
Already fixed up when I applied the first patch. I did more rework on
patch 1 than I'd normally do as I'd sent Song down a dead end with an
incorrect requested change so didn't want to waste more of his time
with a v7 of that patch. This patch 2 was pretty much new so different
matter!
Thanks,
Jonathan
>
> Rob
next prev parent reply other threads:[~2018-09-29 17:38 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 [this message]
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
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=20180929121034.6c5e5826@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@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).