blob: d21fa2865bf4da4aa2873adc081091b840b6cf08 [file] [log] [blame]
Kim, Milo620b2732011-09-07 01:56:14 -07001/*
Kim, Milo620b2732011-09-07 01:56:14 -07002 * Copyright (C) 2011 National Semiconductor
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
Kim, Milo620b2732011-09-07 01:56:14 -07007 */
8
9#ifndef _LP8727_H
10#define _LP8727_H
11
12enum lp8727_eoc_level {
13 EOC_5P,
14 EOC_10P,
15 EOC_16P,
16 EOC_20P,
17 EOC_25P,
18 EOC_33P,
19 EOC_50P,
20};
21
22enum lp8727_ichg {
23 ICHG_90mA,
24 ICHG_100mA,
25 ICHG_400mA,
26 ICHG_450mA,
27 ICHG_500mA,
28 ICHG_600mA,
29 ICHG_700mA,
30 ICHG_800mA,
31 ICHG_900mA,
32 ICHG_1000mA,
33};
34
35struct lp8727_chg_param {
36 /* end of charge level setting */
37 enum lp8727_eoc_level eoc_level;
38 /* charging current */
39 enum lp8727_ichg ichg;
40};
41
42struct lp8727_platform_data {
Milo(Woogyom) Kime57b4322012-01-04 16:23:11 +040043 u8 (*get_batt_present)(void);
44 u16 (*get_batt_level)(void);
45 u8 (*get_batt_capacity)(void);
46 u8 (*get_batt_temp)(void);
Kim, Milo620b2732011-09-07 01:56:14 -070047 struct lp8727_chg_param ac;
48 struct lp8727_chg_param usb;
49};
50
51#endif