From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
narcisaanamaria12@gmail.com, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald <pmeerw@pmeerw.net>,
linux-iio <linux-iio@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] iio: chemical: Add support for external Reset and Wakeup in CCS811
Date: Tue, 14 Apr 2020 19:12:59 +0100 [thread overview]
Message-ID: <20200414191259.5fbfdc2a@archlinux> (raw)
In-Reply-To: <CAHp75Vfk3aw30j8U+BJiobU6s2KsOis_VyUv4+6csbYLFnV9eg@mail.gmail.com>
On Tue, 14 Apr 2020 20:54:49 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Tue, Apr 14, 2020 at 8:06 PM Manivannan Sadhasivam <mani@kernel.org> wrote:
> > On Tue, Apr 14, 2020 at 07:42:24PM +0300, Andy Shevchenko wrote:
> > > On Tue, Apr 14, 2020 at 6:34 PM <mani@kernel.org> wrote:
>
> ...
>
> > > > + reset_gpio = devm_gpiod_get_optional(&client->dev, "reset",
> > > > + GPIOD_OUT_LOW);
> > > > + if (IS_ERR(reset_gpio)) {
> > >
> > > > + dev_err(&client->dev, "Failed to acquire reset gpio\n");
> > >
> > > If it's a deferred probe, it would spam the log.
> > >
> >
> > Hmm. But error is an error isn't it? Would you recommend doing a debug print
> > or completely removing the logging?
>
> I would remove completely, but better to wait for Jonathan to comment.
> Maybe he prefers something like
> if (err != EPROBE_DEFER)
> dev_err()
Not fussed. Either drop it or do the check for defer - one I leave up to the
author.
>
> > > > + return PTR_ERR(reset_gpio);
> > > > + }
> > >
> > > ...
> > >
> > > > + static const u8 reset_seq[] = {
> > > > + 0xFF, 0x11, 0xE5, 0x72, 0x8A,
> > > > + };
> > >
> > > I would suggest to comment above from where you got this and the
> > > meaning of the numbers.
> > >
> >
> > The datasheet doesn't specify the meaning of these values. But will add a
> > comment.
>
> Thanks!
>
> > Btw, just noticed that 0xFF is not needed and only 4 values are
> > sufficient for SW reset.
>
> Better to do exactly what datasheet suggests (in case it's not clear
> or deductible what is going on).
>
next prev parent reply other threads:[~2020-04-14 18:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 15:34 [PATCH v2 0/3] Add Reset and Wakeup support for CCS811 mani
2020-04-14 15:34 ` [PATCH v2 1/3] dt-bindings: iio: chemical: Add binding for CCS811 VOC sensor mani
2020-04-14 15:34 ` [PATCH v2 2/3] iio: chemical: Add support for external Reset and Wakeup in CCS811 mani
2020-04-14 16:42 ` Andy Shevchenko
2020-04-14 17:05 ` Manivannan Sadhasivam
2020-04-14 17:54 ` Andy Shevchenko
2020-04-14 18:12 ` Jonathan Cameron [this message]
2020-04-14 18:26 ` Manivannan Sadhasivam
2020-04-14 15:34 ` [PATCH v2 3/3] iio: chemical: Add OF match table for CCS811 VOC sensor mani
2020-04-14 16:43 ` Andy Shevchenko
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=20200414191259.5fbfdc2a@archlinux \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.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=mani@kernel.org \
--cc=narcisaanamaria12@gmail.com \
--cc=pmeerw@pmeerw.net \
--cc=robh+dt@kernel.org \
/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).