4 * Copyright (C) 2012 Samsung Electronics
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
11 #ifndef _LINUX_ANDROID_BATTERY_H
12 #define _LINUX_ANDROID_BATTERY_H
15 CHARGE_SOURCE_NONE = 0,
20 struct android_bat_callbacks {
21 void (*charge_source_changed)
22 (struct android_bat_callbacks *, int);
23 void (*battery_set_full)(struct android_bat_callbacks *);
26 struct android_bat_platform_data {
27 void (*register_callbacks)(struct android_bat_callbacks *);
28 void (*unregister_callbacks)(void);
29 void (*set_charging_current) (int);
30 void (*set_charging_enable) (int);
31 int (*poll_charge_source) (void);
32 int (*get_capacity) (void);
33 int (*get_temperature) (int *);
34 int (*get_voltage_now)(void);
35 int (*get_current_now)(int *);
37 int temp_high_threshold;
38 int temp_high_recovery;
39 int temp_low_recovery;
40 int temp_low_threshold;
42 unsigned long full_charging_time;
43 unsigned long recharging_time;
44 unsigned int recharging_voltage;