aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/pda_power.h
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2009-01-18 17:40:27 +0100
committerAnton Vorontsov <cbouatmailru@gmail.com>2009-02-02 20:15:47 +0300
commit5bf2b994bfe11bfe86231050897b2d881ca544d9 (patch)
treedcd098222aab1385a24cc68e34967c8ffb71b665 /include/linux/pda_power.h
parentpcf50633_charger: Remove unused mbc_set_status function (diff)
downloadwireguard-linux-5bf2b994bfe11bfe86231050897b2d881ca544d9.tar.xz
wireguard-linux-5bf2b994bfe11bfe86231050897b2d881ca544d9.zip
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>
Diffstat (limited to 'include/linux/pda_power.h')
-rw-r--r--include/linux/pda_power.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h
index cb7d10f30763..d4cf7a2ceb3e 100644
--- a/include/linux/pda_power.h
+++ b/include/linux/pda_power.h
@@ -31,6 +31,8 @@ struct pda_power_pdata {
unsigned int wait_for_status; /* msecs, default is 500 */
unsigned int wait_for_charger; /* msecs, default is 500 */
unsigned int polling_interval; /* msecs, default is 2000 */
+
+ unsigned long ac_max_uA; /* current to draw when on AC */
};
#endif /* __PDA_POWER_H__ */