[Gta04-owner] Battery charger

NeilBrown neilb at suse.de
Sun Feb 17 04:15:42 CET 2013


On Sun, 17 Feb 2013 00:06:09 +0100 Paweł Więcek <coven at vmh.net> wrote:

> On Wed, 2013-02-13 at 10:45 +0100, Rico Rommel wrote:
> > It is enough, but on dumb chargers you will need a USB-cable with shorted D+ 
> > and D- or you can try this udev-rule:
> > 
> > SUBSYSTEM=="power_supply", ACTION=="change", 
> > DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="200k", 
> > ATTR{../../max_current}="500000"
> 
> Does this need /sys/class/power_supply/twl4030_usb/id to exist? Becaus
> there is no such file on either 3.5 or 3.7 kernel (at least one found in
> qtmoko), which would probably explain why I cannot convince GTA04 to
> charge from Openmoko charger or a dummy charger.

No, it isn't in /sys/class/power_supply/twl4030_usb
It is in
 /sys/class/i2c-adapter/i2c-1/1-0048/twl4030_usb/id 
or equally
 /sys/devices/platform/omap_i2c.1/i2c-1/1-0048/twl4030_usb/id

The udev rules I have are:

ATTRS{1-0048/twl4030_usb/id}=="floating", ATTR{../../max_current}="500000"
ATTRS{1-0048/twl4030_usb/id}=="102k", ATTR{../../max_current}="851000"

as '102k' is what I get when I plug in my openmoko charger.

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20130217/f54ceba8/attachment.bin>


More information about the Gta04-owner mailing list