pda_power: Add optional OTG transceiver and voltage regulator support
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sun, 18 Jan 2009 16:40:27 +0000 (17:40 +0100)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Mon, 2 Feb 2009 17:15:47 +0000 (20:15 +0300)
commit5bf2b994bfe11bfe86231050897b2d881ca544d9
treedcd098222aab1385a24cc68e34967c8ffb71b665
parentcc52a29e6245acd9032fcfa0ffcab4cc612de986
pda_power: Add optional OTG transceiver and voltage regulator support

This patch allows machines to use an OTG transceiver driver instead of
supplying a custom is_usb_online callback to check USB power.
Also, in the case that the OTG transceiver handles charger control when
connected to USB, a regulator named "ac_draw" can be supplied instead of
the custom set_charge callback to control the charger when connected to
AC.

The check for (transceiver->state == OTG_STATE_B_PERIPHERAL) in
otg_is_usb_online is probably too simple, I'm just using this with a
peripheral only device and gpio_vbus + bq24022. I'm not sure which other
OTG states can supply power.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/pda_power.c
include/linux/pda_power.h