From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: "Heiko Stübner" <heiko@sntech.de>
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: Wed, 24 Aug 2011 10:07:46 +0100 [thread overview]
Message-ID: <20110824090746.GP9232@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <201108232215.08788.heiko@sntech.de>
On Tue, Aug 23, 2011 at 10:15:07PM +0200, Heiko Stübner wrote:
> 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:
> > > + } 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.
For example if you're asked for a limit below 100mA - disabling the
charger probably isn't a useful implementation. The disable should be
done with enable/disable.
next prev parent reply other threads:[~2011-08-24 9:07 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
2011-08-24 9:07 ` Mark Brown [this message]
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=20110824090746.GP9232@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=heiko@sntech.de \
--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 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).