All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-pm@lists.linux-foundation.org, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] Add regulator driver for the bq2407x family of charger ICs
Date: Tue, 23 Aug 2011 22:15:07 +0200	[thread overview]
Message-ID: <201108232215.08788.heiko@sntech.de> (raw)
In-Reply-To: <20110823115024.GL9232@opensource.wolfsonmicro.com>

Am Dienstag 23 August 2011, 13:50:24 schrieb Mark Brown:
> On Sat, Aug 20, 2011 at 10:24:51PM +0200, Heiko Stübner wrote:
> 
> Mostly looks good, just a few fairly small comments below.
> 
> > +	if (pdata->max_uA && pdata->max_uA > 500000
> > +			      && max_uA >= pdata->max_uA) {
> > +		dev_dbg(rdev_get_dev(rdev),
> > +			"setting current limit to %d mA\n",
> > +			pdata->max_uA / 1000);
> > +		gpio_set_value(pdata->gpio_en2, 1);
> > +		gpio_set_value(pdata->gpio_en1, 0);
> > +	} else if (max_uA >= 500000) {
> > +		dev_dbg(rdev_get_dev(rdev),
> > +			"setting current limit to 500 mA\n");
> > +		gpio_set_value(pdata->gpio_en2, 0);
> > +		gpio_set_value(pdata->gpio_en1, 1);
> > +	} else if (max_uA >= 100000) {
> > +		dev_dbg(rdev_get_dev(rdev),
> > +			"setting current limit to 100 mA\n");
> > +		gpio_set_value(pdata->gpio_en2, 0);
> > +		gpio_set_value(pdata->gpio_en1, 0);
> > +	} else {
> > +		dev_dbg(rdev_get_dev(rdev),
> > +			"setting current limit to 0 mA\n");
> > +		gpio_set_value(pdata->gpio_en2, 1);
> > +		gpio_set_value(pdata->gpio_en1, 1);
> > +	}
> 
> I'd rather expect this to return an error sometimes.
gpio_set_value is a void function, so I'm not sure what could cause an error 
here.

Heiko

  reply	other threads:[~2011-08-23 20:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 20:24 [PATCH] Add regulator driver for the bq2407x family of charger ICs Heiko Stübner
2011-08-23 11:50 ` Mark Brown
2011-08-23 20:15   ` Heiko Stübner [this message]
2011-08-24  9:07     ` Mark Brown
2011-08-24 18:48       ` [PATCH v2] " Heiko Stübner
2011-08-25  6:55         ` MyungJoo Ham
2011-08-25  8:51           ` Heiko Stübner

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=201108232215.08788.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lrg@ti.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.