devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Saravanan Sekar <sravanhome@gmail.com>,
	Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Sebastian Reichel <sre@kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-iio <linux-iio@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v5 3/5] iio: adc: mp2629: Add support for mp2629 ADC driver
Date: Sat, 28 Mar 2020 17:51:16 +0000	[thread overview]
Message-ID: <20200328175116.13c2bae3@archlinux> (raw)
In-Reply-To: <CAHp75Vd+m=1eaDY1JLvtNKbBPXsaTFmpewG=Vn+v-=+GMBCs2w@mail.gmail.com>

On Sat, 28 Mar 2020 12:52:11 +0200
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Sat, Mar 28, 2020 at 2:12 AM Saravanan Sekar <sravanhome@gmail.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


  reply	other threads:[~2020-03-28 17:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28  0:11 [PATCH v5 0/5] Add battery charger driver support for MP2629 Saravanan Sekar
2020-03-28  0:11 ` [PATCH v5 1/5] dt-bindings: mfd: add document bindings for mp2629 Saravanan Sekar
2020-03-28  0:11 ` [PATCH v5 2/5] mfd: mp2629: Add support for mps battery charger Saravanan Sekar
2020-03-28 10:45   ` Andy Shevchenko
2020-03-28 10:51     ` saravanan sekar
2020-03-28 11:06       ` Andy Shevchenko
2020-03-28  0:11 ` [PATCH v5 3/5] iio: adc: mp2629: Add support for mp2629 ADC driver Saravanan Sekar
2020-03-28 10:52   ` Andy Shevchenko
2020-03-28 17:51     ` Jonathan Cameron [this message]
2020-03-28  0:11 ` [PATCH v5 4/5] power: supply: Add support for mps mp2629 battery charger Saravanan Sekar
2020-03-28 11:02   ` Andy Shevchenko
2020-03-28 11:03     ` Andy Shevchenko
2020-03-28 11:29     ` saravanan sekar
2020-03-28 18:44       ` Andy Shevchenko
2020-03-29 10:34         ` saravanan sekar
2020-03-29 11:17           ` Andy Shevchenko
2020-03-28  0:11 ` [PATCH v5 5/5] MAINTAINERS: Add entry for mp2629 Battery Charger driver Saravanan Sekar

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=20200328175116.13c2bae3@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=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=sravanhome@gmail.com \
    --cc=sre@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).