1
2
3
4
5
6
7 #ifndef _UX500_CHARGALG_H
8 #define _UX500_CHARGALG_H
9
10 #include <linux/power_supply.h>
11
12
13
14
15
16
17
18 #define psy_to_ux500_charger(x) power_supply_get_drvdata(psy)
19
20
21 struct ux500_charger;
22
23 struct ux500_charger_ops {
24 int (*enable) (struct ux500_charger *, int, int, int);
25 int (*check_enable) (struct ux500_charger *, int, int);
26 int (*kick_wd) (struct ux500_charger *);
27 int (*update_curr) (struct ux500_charger *, int);
28 };
29
30
31
32
33
34
35
36
37
38
39 struct ux500_charger {
40 struct power_supply *psy;
41 struct ux500_charger_ops ops;
42 int max_out_volt;
43 int max_out_curr;
44 int wdt_refresh;
45 bool enabled;
46 bool external;
47 };
48
49 extern struct blocking_notifier_head charger_notifier_list;
50
51 #endif