]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/linux/pda_power.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Common power driver for PDAs and phones with one or two external
4 * power supplies (AC/USB) connected to main and backup batteries,
5 * and optional builtin charger.
7 * Copyright © 2007 Anton Vorontsov <cbou@mail.ru>
10 #ifndef __PDA_POWER_H__
11 #define __PDA_POWER_H__
13 #define PDA_POWER_CHARGE_AC (1 << 0)
14 #define PDA_POWER_CHARGE_USB (1 << 1)
18 struct pda_power_pdata
{
19 int (*init
)(struct device
*dev
);
20 int (*is_ac_online
)(void);
21 int (*is_usb_online
)(void);
22 void (*set_charge
)(int flags
);
23 void (*exit
)(struct device
*dev
);
24 int (*suspend
)(pm_message_t state
);
28 size_t num_supplicants
;
30 unsigned int wait_for_status
; /* msecs, default is 500 */
31 unsigned int wait_for_charger
; /* msecs, default is 500 */
32 unsigned int polling_interval
; /* msecs, default is 2000 */
34 unsigned long ac_max_uA
; /* current to draw when on AC */
36 bool use_otg_notifier
;
39 #endif /* __PDA_POWER_H__ */