public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: linux-kernel@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>,
	Alessandro Zummo <a.zummo@towertech.it>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Lukasz Majewski <l.majewski@samsung.com>
Subject: Re: [PATCH v2 5/6] MFD MAX8998/LP3974: Charger Support
Date: Thu, 23 Dec 2010 02:36:59 +0000	[thread overview]
Message-ID: <20101223023659.GC25886@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <AANLkTimhfUTD0ze8VaBz9BtkuEMx9sutc-1VvsXfH-ot@mail.gmail.com>

On Thu, Dec 23, 2010 at 11:10:41AM +0900, MyungJoo Ham wrote:
> On Wed, Dec 22, 2010 at 10:33 PM, Mark Brown
> > On Wed, Dec 22, 2010 at 03:23:10PM +0900, MyungJoo Ham wrote:

> > Normally I'd expect a battery charger to be exposed via the power supply
> > API - I'd at least expect to see a consumer in the power supply API

> The "CHARGER" regulator is to give the charger control to the user,
> which consists of switching (turn on/off) and current limit, which is
> what a current regulator does. On the contrary, when the charger
> control is implemented by power supply API, we do not have explicit
> control over such features (current limit and turn on/off).

Sure, like I say I'd just expect to see some power supply API visibility
- that could be a driver that provides the control that's needed to
userspace by controlling a current regulator, for example.

> Furthermore, a board may need to support multiple types of
> charger(USB, ACDC-5V-2A, ACDC-5V-1A, ...), which have various current
> limits. Thus, we need to adjust charger current limit out of PMIC
> driver unless the PMIC can detect every type of supported chargers,
> which MAX8998/LP3974 cannot.

Interesting system design - I've not seen that before.  With the system
designs I usually look at the current limiting from the wall/charger
supply is done on the primary system power rail which supplies both
thehcarger and the rest of the system (since the current drains from the
rest of the system also needs to be limited).  Similarly for the
temperature monitoring, I've usually seen that managed by hardware.

> That's why I have implemented charger in regulator framework. In the
> environment described above, the power supply consumer is going to be
> implemented over PMIC driver, USB/TA select driver (e.g., FSA9480),
> and Thermistor driver (e.g., NTC Thermistor). It appears that such a
> consumer driver is going to be a board or policy specification; (or
> full or callbacks that is going to be filled by a mach/board file)

I agree - it'd be a bit like the current GPIO power supply driver, I
think.  It'd probably also specify things like callbacks for voltage
monitoring via auxiliary ADCs in the PMIC or CPU.  My main point was
that it was surprising that the regulator driver for the charger didn't
come along with such a consuner driver, the split does make sense.

  reply	other threads:[~2010-12-23  2:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21  2:22 [PATCH] MFD MAX8998/LP3974: Add Features: hibernation, charger, and other misc MyungJoo Ham
2010-12-21 15:50 ` Mark Brown
2010-12-22  6:23   ` [PATCH v2 0/6] MFD MAX8998/LP3974 Driver Update MyungJoo Ham
2010-12-22  6:23   ` [PATCH v2 1/6] MFD MAX8998/LP3974: Support Hibernation MyungJoo Ham
2010-12-22 13:22     ` Mark Brown
2010-12-23  1:40       ` MyungJoo Ham
2010-12-22  6:23   ` [PATCH v2 2/6] MFD MAX8998/LP3974: Support LP3974 RTC MyungJoo Ham
2010-12-22 13:25     ` Mark Brown
2010-12-23  1:45       ` MyungJoo Ham
2010-12-22  6:23   ` [PATCH v2 3/6] MFD MAX8998/LP3974 Bugfix: incorrect variable name (typo) MyungJoo Ham
2010-12-22 13:27     ` Mark Brown
2010-12-23  8:23       ` MyungJoo Ham
2010-12-22  6:23   ` [PATCH v2 4/6] MFD MAX8998/LP3974 Bufgix: accessing array out of bound MyungJoo Ham
2010-12-22 13:29     ` Mark Brown
2010-12-22  6:23   ` [PATCH v2 5/6] MFD MAX8998/LP3974: Charger Support MyungJoo Ham
2010-12-22 13:33     ` Mark Brown
2010-12-23  2:10       ` MyungJoo Ham
2010-12-23  2:36         ` Mark Brown [this message]
2010-12-22  6:23   ` [PATCH v2 6/6] MFD MAX8998/LP3974: Support DVS-GPIO MyungJoo Ham
2010-12-22 13:36     ` Mark Brown

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=20101223023659.GC25886@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=a.zummo@towertech.it \
    --cc=jy0922.shim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=l.majewski@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=myungjoo.ham@samsung.com \
    --cc=sameo@linux.intel.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