diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-02-19 05:56:38 +0100 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-02-19 05:56:38 +0100 |
| commit | 19796a75ab8ba43b31e230ea169d5383c6392bfc (patch) | |
| tree | 3041c5678e06133dd7fcbf2ebf34b6506334f677 /libdde_linux26/contrib/include/linux/pda_power.h | |
| parent | 6b2e5e0d91823c2a6ce5a5cb12ae3d00b82adae7 (diff) | |
| parent | 8df772b3c665e663f6f9d2a70f9c691590bd3f91 (diff) | |
Merge branch 'dde' into upstream-merged
Diffstat (limited to 'libdde_linux26/contrib/include/linux/pda_power.h')
| -rw-r--r-- | libdde_linux26/contrib/include/linux/pda_power.h | 36 |
1 files changed, 36 insertions, 0 deletions
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 <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 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__ */ |
