[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200328175116.13c2bae3@archlinux>
Date: Sat, 28 Mar 2020 17:51:16 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Saravanan Sekar <sravanhome@...il.com>,
Lee Jones <lee.jones@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald <pmeerw@...erw.net>,
Sebastian Reichel <sre@...nel.org>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-iio <linux-iio@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v5 3/5] iio: adc: mp2629: Add support for mp2629 ADC
driver
On Sat, 28 Mar 2020 12:52:11 +0200
Andy Shevchenko <andy.shevchenko@...il.com> wrote:
> On Sat, Mar 28, 2020 at 2:12 AM Saravanan Sekar <sravanhome@...il.com> wrote:
> >
> > Add support for 8-bit resolution ADC readings for input power
> > supply and battery charging measurement. Provides voltage, current
> > readings to mp2629 power supply driver.
>
> ...
>
> > + ret = regmap_read(info->regmap, chan->address, &rval);
> > + if (ret < 0)
>
> ' < 0' is not needed for regmap call.
>
> ..
>
> > + case MP2629_INPUT_CURRENT:
> > + *val = 133;
> > + *val2 = 10;
> > + return IIO_VAL_FRACTIONAL;
> > +
> > + default:
> > + return -EINVAL;
> > + }
> > +
> > + default:
> > + return -EINVAL;
> > + }
>
> > +
> > + return 0;
>
> Do you really need this? Looks to me as dead code.
>
> ...
>
> > + indio_dev->name = dev_name(dev);
>
> Shouldn't be this a part number?
> I heard something, so, I might be mistaken, but I hope maintainers
> will help here.
It should indeed. I have a nasty habit of missing this in
review so thanks for pointing it out!
Jonathan
Powered by blists - more mailing lists