All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: NeilBrown <neilb@suse.de>
Cc: Felipe Balbi <balbi@ti.com>,
	"Dr. H. Nikolaus Schaller" <hns@goldelico.com>,
	Grazvydas Ignotas <notasas@gmail.com>,
	Igor Grinberg <grinberg@compulab.co.il>,
	Lee Jones <lee.jones@linaro.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	List for communicating with real GTA04 owners
	<gta04-owner@goldelico.com>
Subject: Re: [PATCH] mfd: twl4030-power: Fix poweroff with PM configuration enabled
Date: Fri, 21 Nov 2014 15:37:10 -0800	[thread overview]
Message-ID: <20141121233709.GA7046@atomide.com> (raw)
In-Reply-To: <20141119144348.169c4166@notabene.brown>

* NeilBrown <neilb@suse.de> [141118 19:45]:
> On Wed, 12 Nov 2014 16:31:54 -0600 Felipe Balbi <balbi@ti.com> wrote:
> > 
> > this is actually what the USB Battery Charging spec requires us to
> > implement. If Linux is doing differently, it's a bug on Linux which
> > should be fixed :-)
> > 
> > No host is allowed to source more then one unit load (100mA in LS/FS/HS,
> > 150mA in SS) until the device is fully enumerated. Host are also
> > required to drop max current budget to 8mA (IIRC) if the device doesn't
> > enumerate for however many minutes (I guess it was a pretty long
> > threshold, something like half an hour or so. My memory fails me right
> > now).
> > 
> 
> I think the twl4030 driver does do the "right" thing unless the "allow_usb"
> module parameter is set, in which case it enables charging at a higher rate
> which is 600mA (default value of BCIIREF1).
> 
> It would be nice if the driver could check if a charger was plugged in and
> act accordingly.
> The charger I have for my openmoko is identified by a 47K resistor between ID
> and ground.  The twl4030 can detect that easily enough, but it isn't very
> standard.

Sounds doable to me, feel free to patch it up since you guys are using
the twl4030 charger :)
 
> The standard is of course to have D+ and D- shorted, but I don't know if the
> twl4030 can detect that?  If it can, then getting some very early code to
> check for the short (or the 47k resistor) and quickly enabling charging might
> be a sufficient solution.

I guess. Note that there's also the USB BC1.2 spec that is more
complicated than having the data lines shorted.

Regards,

Tony

  reply	other threads:[~2014-11-21 23:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02 18:07 [PATCH] mfd: twl4030-power: Fix poweroff with PM configuration enabled Tony Lindgren
2014-11-03 15:30 ` Lee Jones
2014-11-04 13:20 ` Igor Grinberg
2014-11-04 13:20   ` Igor Grinberg
2014-11-04 15:42   ` Tony Lindgren
2014-11-04 17:52     ` Igor Grinberg
2014-11-04 18:04       ` Tony Lindgren
2014-11-12 15:45     ` Grazvydas Ignotas
2014-11-12 16:26       ` Tony Lindgren
2014-11-12 20:26       ` Dr. H. Nikolaus Schaller
2014-11-12 21:20         ` Tony Lindgren
2014-11-12 22:31           ` Felipe Balbi
2014-11-19  3:43             ` NeilBrown
2014-11-21 23:37               ` Tony Lindgren [this message]
2014-11-07 11:25 ` Russell King - ARM Linux
2014-11-10 12:40 ` Lee Jones
2014-11-10 12:40   ` Lee Jones
2014-11-10 17:53   ` Russell King - ARM Linux
2014-11-11 12:31     ` Lee Jones
2014-11-11 12:31       ` Lee Jones

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=20141121233709.GA7046@atomide.com \
    --to=tony@atomide.com \
    --cc=balbi@ti.com \
    --cc=grinberg@compulab.co.il \
    --cc=gta04-owner@goldelico.com \
    --cc=hns@goldelico.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=neilb@suse.de \
    --cc=notasas@gmail.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 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.