[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200414182652.GA29921@Mani-XPS-13-9360>
Date: Tue, 14 Apr 2020 23:56:52 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Rob Herring <robh+dt@...nel.org>, narcisaanamaria12@...il.com,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
linux-iio <linux-iio@...r.kernel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] iio: chemical: Add support for external Reset and
Wakeup in CCS811
On Tue, Apr 14, 2020 at 07:12:59PM +0100, Jonathan Cameron wrote:
> On Tue, 14 Apr 2020 20:54:49 +0300
> Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>
> > On Tue, Apr 14, 2020 at 8:06 PM Manivannan Sadhasivam <mani@...nel.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@...nel.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.
>
Okay, will just drop it.
Thanks,
Mani
> >
> > > > > + 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).
> >
>
Powered by blists - more mailing lists