All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: David Brownell <david-b@pacbell.net>
Cc: Felipe Balbi <felipe.balbi@nokia.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Anton Vorontsov <avorontsov@ru.mvista.com>,
	Grazvydas Ignotas <notasas@gmail.com>,
	Madhusudhan Chikkature <madhu.cr@ti.com>,
	linux-omap@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>
Subject: Re: [RFC/PATCH 1/5] usb: otg: add notifier support
Date: Tue, 26 Jan 2010 14:21:02 +0000	[thread overview]
Message-ID: <20100126142102.GU15759@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <201001260535.21689.david-b@pacbell.net>

On Tue, Jan 26, 2010 at 05:35:21AM -0800, David Brownell wrote:
> On Tuesday 26 January 2010, Mark Brown wrote:

> > Yes please - it's not just chargers either, this can also be used by
> > PMICs which do power path management that includes USB.

> Color me confused ... what do you mean by "power path"?

In the sort of design I'm talking about there is generally a system
power rail which is generated from the various power sources available
to the system, which might include a combination of batteries, USB and
wall adaptors.  The power path management logic is the hardware which
controls which of these are actually being used as supplies, and may
also include battery charger management.

> Do you mean something like "the board as a whole can take N mA of
> current from USB", rather than specifically addressing a charger?

Pretty much, from this point of view.

> It's not uncommon to do things like use VBUS current to power the
> USB circuitry, too.  That can leave less for other purposes.  All
> of that being rather board-specific.

In this sort of design either VBUS goes through the power path
management logic before anything else gets to use it or the hardware
will know about the headroom it needs to leave.  The power path
management will usually do things like try to suppliment VBUS with any
battery that's available to generate the main system supply rail.

This all needs to function without software since it tends to get used
to decide things like if the system is able to begin power up at all, .

> > > Those seem like the wrong events.  The right events for a charger
> > > would be more along the lines of:

> > >  - For peripheral:  "you may use N milliAmperes now".
> > >  - General:  "Don't Charge" (a.k.a. "use 0 mA").

> > > I don't see how "N" would be passed with those events ...

> > These are good for the peripheral side.  You do get to pass a void *
> > along with the notifier value, that could be used to pass data like the
> > current limit.

> I don't think I saw that being done ... either in code, comments,
> or documentation.  Passing N is fundamental.

I think we're talking at cross purposes - I was reading "these events"
as being the new events quoted above, not the events in the existing
code.  I certainly agree that N is fundamental.

> Thing is, supplying current is a bit more involved.  If the
> board can't supply 300 mA, the USB configuration selection
> mechanism has to know that, so it never selects peripheral
> configurations which require that much current.

Indeed, the specific limits are more used for protection against things
like the connected devices drawing more current than they claimed than
anything else.

> Ergo my desire to start with a straightforward problem whose
> solution has real value (how much VBUS current may be consumed?),
> and leave some of those other messes for later!

Understandable.  It would be good to have an idea what sort of general
direction to go in there, though I do agree that the gadget case is much
more important here.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: Felipe Balbi
	<felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Anton Vorontsov
	<avorontsov-hkdhdckH98+B+jHODAdFcQ@public.gmane.org>,
	Grazvydas Ignotas
	<notasas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Madhusudhan Chikkature <madhu.cr-l0cyMroinI0@public.gmane.org>,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Greg Kroah-Hartman <gregkh-l3A5Bk7waGM@public.gmane.org>
Subject: Re: [RFC/PATCH 1/5] usb: otg: add notifier support
Date: Tue, 26 Jan 2010 14:21:02 +0000	[thread overview]
Message-ID: <20100126142102.GU15759@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <201001260535.21689.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>

On Tue, Jan 26, 2010 at 05:35:21AM -0800, David Brownell wrote:
> On Tuesday 26 January 2010, Mark Brown wrote:

> > Yes please - it's not just chargers either, this can also be used by
> > PMICs which do power path management that includes USB.

> Color me confused ... what do you mean by "power path"?

In the sort of design I'm talking about there is generally a system
power rail which is generated from the various power sources available
to the system, which might include a combination of batteries, USB and
wall adaptors.  The power path management logic is the hardware which
controls which of these are actually being used as supplies, and may
also include battery charger management.

> Do you mean something like "the board as a whole can take N mA of
> current from USB", rather than specifically addressing a charger?

Pretty much, from this point of view.

> It's not uncommon to do things like use VBUS current to power the
> USB circuitry, too.  That can leave less for other purposes.  All
> of that being rather board-specific.

In this sort of design either VBUS goes through the power path
management logic before anything else gets to use it or the hardware
will know about the headroom it needs to leave.  The power path
management will usually do things like try to suppliment VBUS with any
battery that's available to generate the main system supply rail.

This all needs to function without software since it tends to get used
to decide things like if the system is able to begin power up at all, .

> > > Those seem like the wrong events.  The right events for a charger
> > > would be more along the lines of:

> > >  - For peripheral:  "you may use N milliAmperes now".
> > >  - General:  "Don't Charge" (a.k.a. "use 0 mA").

> > > I don't see how "N" would be passed with those events ...

> > These are good for the peripheral side.  You do get to pass a void *
> > along with the notifier value, that could be used to pass data like the
> > current limit.

> I don't think I saw that being done ... either in code, comments,
> or documentation.  Passing N is fundamental.

I think we're talking at cross purposes - I was reading "these events"
as being the new events quoted above, not the events in the existing
code.  I certainly agree that N is fundamental.

> Thing is, supplying current is a bit more involved.  If the
> board can't supply 300 mA, the USB configuration selection
> mechanism has to know that, so it never selects peripheral
> configurations which require that much current.

Indeed, the specific limits are more used for protection against things
like the connected devices drawing more current than they claimed than
anything else.

> Ergo my desire to start with a straightforward problem whose
> solution has real value (how much VBUS current may be consumed?),
> and leave some of those other messes for later!

Understandable.  It would be good to have an idea what sort of general
direction to go in there, though I do agree that the gadget case is much
more important here.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-01-26 14:21 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 14:44 [PATCH] power_supply: Add driver for TWL4030/TPS65950 BCI charger Grazvydas Ignotas
2009-11-27 14:44 ` Grazvydas Ignotas
2009-11-27 14:54 ` Anton Vorontsov
2009-11-27 15:47   ` Grazvydas Ignotas
2009-11-27 16:23     ` Mark Brown
2009-11-30 18:45 ` Madhusudhan
2009-11-30 18:45   ` Madhusudhan
2009-11-30 18:58   ` Anton Vorontsov
2009-12-02 20:38     ` Grazvydas Ignotas
2009-12-02 20:38       ` Grazvydas Ignotas
2009-12-02 21:27       ` Anton Vorontsov
2009-12-02 21:27         ` Anton Vorontsov
2009-12-02 21:32         ` Grazvydas Ignotas
2009-11-30 21:33   ` Grazvydas Ignotas
2009-12-02 16:59     ` Madhusudhan
2009-12-02 16:59       ` Madhusudhan
2009-12-02 17:33 ` Felipe Balbi
2009-12-02 20:34   ` Grazvydas Ignotas
2009-12-02 20:49     ` Felipe Balbi
2009-12-02 20:49       ` Felipe Balbi
2009-12-02 21:29       ` Grazvydas Ignotas
2009-12-02 21:29         ` Grazvydas Ignotas
2009-12-02 21:54         ` Anton Vorontsov
2009-12-02 22:31           ` Felipe Balbi
2009-12-02 22:59             ` Anton Vorontsov
2009-12-03  8:39               ` Felipe Balbi
2009-12-03 10:55                 ` Grazvydas Ignotas
2009-12-03 11:03                   ` Felipe Balbi
2009-12-10 14:09                     ` Grazvydas Ignotas
2009-12-10 14:18                       ` Anton Vorontsov
2009-12-10 14:21                         ` Felipe Balbi
2009-12-10 14:44                           ` Anton Vorontsov
2009-12-10 16:51                             ` Felipe Balbi
2009-12-10 20:51                               ` Grazvydas Ignotas
2009-12-11 11:31                                 ` [RFC/PATCH 0/5] usb transceiver notifier Felipe Balbi
2009-12-11 11:31                                   ` Felipe Balbi
2009-12-11 11:31                                 ` [RFC/PATCH 1/5] usb: otg: add notifier support Felipe Balbi
2009-12-11 11:55                                   ` Mark Brown
2009-12-11 11:55                                     ` Mark Brown
2009-12-11 11:58                                     ` Felipe Balbi
2010-01-26 11:16                                   ` David Brownell
2010-01-26 13:11                                     ` Mark Brown
2010-01-26 13:35                                       ` David Brownell
2010-01-26 14:14                                         ` Felipe Balbi
2010-01-26 14:24                                           ` Oliver Neukum
2010-01-26 14:30                                             ` Felipe Balbi
2010-01-26 14:30                                               ` Felipe Balbi
2010-01-26 15:16                                               ` David Brownell
2010-01-26 15:21                                           ` David Brownell
2010-01-26 18:50                                             ` Felipe Balbi
2010-01-26 14:21                                         ` Mark Brown [this message]
2010-01-26 14:21                                           ` Mark Brown
2010-01-26 15:44                                           ` David Brownell
2010-01-26 16:13                                             ` Mark Brown
2010-01-26 14:10                                     ` Felipe Balbi
2010-01-26 14:19                                       ` Felipe Balbi
2010-01-26 15:33                                         ` David Brownell
2010-01-26 15:33                                           ` David Brownell
2010-01-26 15:07                                       ` David Brownell
2010-01-26 15:07                                         ` David Brownell
2010-01-26 19:09                                         ` Felipe Balbi
2010-01-26 19:15                                           ` Felipe Balbi
2010-01-26 19:15                                             ` Felipe Balbi
2009-12-11 11:31                                 ` [RFC/PATCH 2/5] usb: otg: twl4030: add support for notifier Felipe Balbi
2009-12-11 17:22                                   ` sai pavan
2009-12-11 17:22                                     ` sai pavan
2009-12-11 20:40                                     ` Felipe Balbi
2009-12-11 20:40                                       ` Felipe Balbi
2009-12-12 18:34                                       ` Mark Brown
2009-12-14 10:30                                         ` [RFC/PATCH 0/4] twl4030 threaded_irq support Felipe Balbi
2010-01-26  7:06                                           ` David Brownell
2010-01-26  7:06                                             ` David Brownell
2010-01-26  7:36                                             ` David Brownell
2010-01-26  7:36                                               ` David Brownell
2010-01-26 10:07                                             ` Mark Brown
2010-01-26 11:02                                             ` Felipe Balbi
2010-01-26 12:18                                               ` David Brownell
2010-01-26 12:18                                                 ` David Brownell
2009-12-14 10:30                                         ` [RFC/PATCH 1/4] input: keyboard: twl4030: move to request_threaded_irq Felipe Balbi
2009-12-14 10:30                                           ` Felipe Balbi
2009-12-14 10:30                                         ` [RFC/PATCH 2/4] input: misc: " Felipe Balbi
2009-12-14 10:30                                           ` Felipe Balbi
2009-12-14 11:31                                           ` Shilimkar, Santosh
2009-12-14 11:40                                             ` Felipe Balbi
2009-12-14 13:16                                               ` Shilimkar, Santosh
2009-12-14 10:30                                         ` [RFC/PATCH 3/4] rtc: " Felipe Balbi
2009-12-14 10:30                                         ` [RFC/PATCH 4/4] usb: otg: " Felipe Balbi
2009-12-14 10:30                                           ` Felipe Balbi
2009-12-11 11:31                                 ` [RFC/PATCH 3/5] usb: musb: add support for ulpi block Felipe Balbi
2009-12-11 11:31                                   ` Felipe Balbi
2009-12-11 11:31                                 ` [RFC/PATCH 4/5] usb: musb: isp1704: add registers from isp1704 Felipe Balbi
2009-12-11 11:31                                   ` Felipe Balbi
2009-12-11 12:35                                   ` Krogerus Heikki (EXT-Teleca/Helsinki)
2009-12-11 12:35                                     ` Krogerus Heikki (EXT-Teleca/Helsinki)
2009-12-11 12:57                                     ` Felipe Balbi
2009-12-11 12:57                                       ` Felipe Balbi
2009-12-11 11:31                                 ` [RFC/PATCH 5/5] usb: musb: musb supports otg notifier Felipe Balbi
2009-12-11 11:40                                   ` Felipe Balbi
2009-12-11 11:40                                     ` Felipe Balbi
2009-12-30 19:07                             ` [PATCH] power_supply: Add driver for TWL4030/TPS65950 BCI charger Madhusudhan
2009-12-30 19:07                               ` Madhusudhan
2009-12-10 14:19                       ` Felipe Balbi

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=20100126142102.GU15759@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=david-b@pacbell.net \
    --cc=felipe.balbi@nokia.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=madhu.cr@ti.com \
    --cc=notasas@gmail.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.