]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/pda_power.h
KVM: arm64: Fix PMU probe ordering
[mirror_ubuntu-jammy-kernel.git] / include / linux / pda_power.h
CommitLineData
d2912cb1 1/* SPDX-License-Identifier: GPL-2.0-only */
b2998049
AV
2/*
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.
6 *
7 * Copyright © 2007 Anton Vorontsov <cbou@mail.ru>
b2998049
AV
8 */
9
10#ifndef __PDA_POWER_H__
11#define __PDA_POWER_H__
12
13#define PDA_POWER_CHARGE_AC (1 << 0)
14#define PDA_POWER_CHARGE_USB (1 << 1)
15
f6b6b180
PZ
16struct device;
17
b2998049 18struct pda_power_pdata {
f6b6b180 19 int (*init)(struct device *dev);
b2998049
AV
20 int (*is_ac_online)(void);
21 int (*is_usb_online)(void);
22 void (*set_charge)(int flags);
f6b6b180 23 void (*exit)(struct device *dev);
a3bcbbee
DM
24 int (*suspend)(pm_message_t state);
25 int (*resume)(void);
b2998049
AV
26
27 char **supplied_to;
28 size_t num_supplicants;
29
30 unsigned int wait_for_status; /* msecs, default is 500 */
31 unsigned int wait_for_charger; /* msecs, default is 500 */
c3caebad 32 unsigned int polling_interval; /* msecs, default is 2000 */
5bf2b994
PZ
33
34 unsigned long ac_max_uA; /* current to draw when on AC */
9ad63986
DZ
35
36 bool use_otg_notifier;
b2998049
AV
37};
38
39#endif /* __PDA_POWER_H__ */