How to control charging on USB OTG port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I've got an ARM development board with Allwinner A20 SoC and AXP209
charging controller for the attached battery. I'm using the USB OTG
port for a MIDI USB gadget and would like to control how and when my
board tries to charge the battery via the OTG USB connection. When
attached to a USB wall plug it should charge at high speed, to a
"normal" USB port at slower speed and when attached to an iPad (via
camera connection kit) it should not charge at all.

I think I found the relevant registers on the AXP209 chip that control
the charging current, but I don't know how to detect how much power
the USB connection can supply, and whether or not I'm connected to the
iPad (to disable charging altogether).
Do I even need to poke the AXP directly, or is there some kind of
kernel device that I can control, maybe even from userland?

I'm currently running a linux-sunxi 3.4 kernel.

All the best,

    Marcus
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux