[Gta04-owner] udev magic for setting USB current usage.

NeilBrown neilb at suse.de
Sun Apr 22 07:54:00 CEST 2012


For people running a recent kernel on GTA04, one with

   /sys/devices/platform/omap/omap_i2c.1/i2c-1/1-0048/twl4030_usb/id

the following two lines can be placed in a "usb.rules" file in
/etc/udev/rules.d so that it will automatically select an appropriate current.

I've chosen 500mA for normal USB, and 851mA for Openmoko charger (kernel
does not yet support higher values).

It should be fairly obvious how to modify this to suit other needs.

NeilBrown


SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="floating", ATTR{../../max_current}="500000"
SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="102k", ATTR{../../max_current}="851000"
-------------- 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/20120422/7445afc7/attachment.bin>


More information about the Gta04-owner mailing list