blob: ea98c6133d32c694b57641906a146163f50a2af0 [file] [log] [blame]
Kim, Milo620b2732011-09-07 01:56:14 -07001/*
Kim, Milof7bae492012-01-26 22:59:08 -08002 * LP8727 Micro/Mini USB IC with integrated charger
Kim, Miloe39b8282012-01-29 17:28:18 -08003 *
4 * Copyright (C) 2011 Texas Instruments
Kim, Milo620b2732011-09-07 01:56:14 -07005 * Copyright (C) 2011 National Semiconductor
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
Kim, Milo620b2732011-09-07 01:56:14 -070010 */
11
12#ifndef _LP8727_H
13#define _LP8727_H
14
15enum lp8727_eoc_level {
16 EOC_5P,
17 EOC_10P,
18 EOC_16P,
19 EOC_20P,
20 EOC_25P,
21 EOC_33P,
22 EOC_50P,
23};
24
25enum lp8727_ichg {
26 ICHG_90mA,
27 ICHG_100mA,
28 ICHG_400mA,
29 ICHG_450mA,
30 ICHG_500mA,
31 ICHG_600mA,
32 ICHG_700mA,
33 ICHG_800mA,
34 ICHG_900mA,
35 ICHG_1000mA,
36};
37
Kim, Milo9b11adc72012-01-26 22:59:00 -080038/**
39 * struct lp8727_chg_param
40 * @eoc_level : end of charge level setting
41 * @ichg : charging current
42 */
Kim, Milo620b2732011-09-07 01:56:14 -070043struct lp8727_chg_param {
Kim, Milo620b2732011-09-07 01:56:14 -070044 enum lp8727_eoc_level eoc_level;
Kim, Milo620b2732011-09-07 01:56:14 -070045 enum lp8727_ichg ichg;
46};
47
Kim, Milo9b11adc72012-01-26 22:59:00 -080048/**
49 * struct lp8727_platform_data
50 * @get_batt_present : check battery status - exists or not
51 * @get_batt_level : get battery voltage (mV)
52 * @get_batt_capacity : get battery capacity (%)
53 * @get_batt_temp : get battery temperature
54 * @ac, @usb : charging parameters each charger type
55 */
Kim, Milo620b2732011-09-07 01:56:14 -070056struct lp8727_platform_data {
Milo(Woogyom) Kime57b4322012-01-04 16:23:11 +040057 u8 (*get_batt_present)(void);
58 u16 (*get_batt_level)(void);
59 u8 (*get_batt_capacity)(void);
60 u8 (*get_batt_temp)(void);
Kim, Milo620b2732011-09-07 01:56:14 -070061 struct lp8727_chg_param ac;
62 struct lp8727_chg_param usb;
63};
64
65#endif