From 8a6d48c0542876eb3acfc0970c0ab7872db08d5f Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Sun, 6 Dec 2009 05:26:23 +0100 Subject: check in the original version of dde linux26. --- libdde_linux26/contrib/include/linux/pda_power.h | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 libdde_linux26/contrib/include/linux/pda_power.h (limited to 'libdde_linux26/contrib/include/linux/pda_power.h') diff --git a/libdde_linux26/contrib/include/linux/pda_power.h b/libdde_linux26/contrib/include/linux/pda_power.h new file mode 100644 index 00000000..cb7d10f3 --- /dev/null +++ b/libdde_linux26/contrib/include/linux/pda_power.h @@ -0,0 +1,36 @@ +/* + * 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 + * + * 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 device; + +struct pda_power_pdata { + int (*init)(struct device *dev); + int (*is_ac_online)(void); + int (*is_usb_online)(void); + void (*set_charge)(int flags); + void (*exit)(struct device *dev); + + 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 */ + unsigned int polling_interval; /* msecs, default is 2000 */ +}; + +#endif /* __PDA_POWER_H__ */ -- cgit v1.2.3