aboutsummaryrefslogtreecommitdiff
path: root/include/linux/pda_power.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 14:47:59 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 14:47:59 -0700
commit5f60cfd932b42c69ed3226400cb5eab152576c3a (patch)
tree70e4feba5158e76060d36a6c015be8297c294bca /include/linux/pda_power.h
parent9f9d76321659b5ebc9939101481f7c3ce228ea6e (diff)
parentd7ce6d1d5f6e307a2fbb69626cf120e20e793fe7 (diff)
Merge git://git.infradead.org/~dwmw2/battery-2.6
* git://git.infradead.org/~dwmw2/battery-2.6: [BATTERY] ds2760 W1 slave [BATTERY] One Laptop Per Child power/battery driver [BATTERY] Apple PMU driver [BATTERY] 1-Wire ds2760 chip battery driver [BATTERY] APM emulation driver for class batteries [BATTERY] pda_power platform driver [BATTERY] Universal power supply class (was: battery class)
Diffstat (limited to 'include/linux/pda_power.h')
-rw-r--r--include/linux/pda_power.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/pda_power.h b/include/linux/pda_power.h
new file mode 100644
index 00000000000..1375f15797e
--- /dev/null
+++ b/include/linux/pda_power.h
@@ -0,0 +1,31 @@
+/*
+ * Common power driver for PDAs and phones with one or two external
+ * power supplies (AC/USB) connected to main and backup batteries,
+ * and optional builtin charger.
+ *
+ * Copyright © 2007 Anton Vorontsov <cbou@mail.ru>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __PDA_POWER_H__
+#define __PDA_POWER_H__
+
+#define PDA_POWER_CHARGE_AC (1 << 0)
+#define PDA_POWER_CHARGE_USB (1 << 1)
+
+struct pda_power_pdata {
+ int (*is_ac_online)(void);
+ int (*is_usb_online)(void);
+ void (*set_charge)(int flags);
+
+ char **supplied_to;
+ size_t num_supplicants;
+
+ unsigned int wait_for_status; /* msecs, default is 500 */
+ unsigned int wait_for_charger; /* msecs, default is 500 */
+};
+
+#endif /* __PDA_POWER_H__ */