import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / misc / mediatek / power / mt8127 / addon / bq27541.h
1 /*****************************************************************************
2 *
3 * Filename:
4 * ---------
5 * bq27541.h
6 *
7 * Project:
8 * --------
9 * Android
10 *
11 * Description:
12 * ------------
13 * bq27541 header file
14 *
15 * Author:
16 * -------
17 *
18 ****************************************************************************/
19
20 #ifndef _bq27541_SW_H_
21 #define _bq27541_SW_H_
22
23 /**********************************************************
24 *
25 * [MASK/SHIFT]
26 *
27 *********************************************************/
28 #define BQ27541_CMD_AtRate 0x02
29 #define BQ27541_CMD_AtRateTimeToEmpty 0x04
30 #define BQ27541_CMD_Temperature 0x06
31 #define BQ27541_CMD_Voltage 0x08
32 #define BQ27541_CMD_Flags 0x0A
33 #define BQ27541_CMD_NominalAvailableCapacity 0x0C
34 #define BQ27541_CMD_FullAvailableCapacity 0x0E
35 #define BQ27541_CMD_RemainingCapacity 0x10
36 #define BQ27541_CMD_FullChargeCapacity 0x12
37 #define BQ27541_CMD_AverageCurrent 0x14
38 #define BQ27541_CMD_TimeToEmpty 0x16
39 #define BQ27541_CMD_TimeToFull 0x18
40 #define BQ27541_CMD_StandbyCurrent 0x1A
41 #define BQ27541_CMD_StandbyTimeToEmpty 0x1C
42 #define BQ27541_CMD_MaxLoadCurrent 0x1E
43 #define BQ27541_CMD_MaxLoadTimeToEmpty 0x20
44 #define BQ27541_CMD_AvailableEnergy 0x22
45 #define BQ27541_CMD_AveragePower 0x24
46 #define BQ27541_CMD_TimeToEmptyAtConstantPower 0x26
47 #define BQ27541_CMD_Internal_Temp 0x28
48 #define BQ27541_CMD_CycleCount 0x2A
49 #define BQ27541_CMD_StateOfCharge 0x2C
50 #define BQ27541_CMD_StateOfHealth 0x2E
51 #define BQ27541_CMD_PassedCharge 0x34
52 #define BQ27541_CMD_DOD0 0x36
53
54 /**********************************************************
55 *
56 * [Extern Function]
57 *
58 *********************************************************/
59 extern int bq27541_set_cmd_read(kal_uint8 cmd, int *returnData);
60 extern int bq27541_set_cmd_write(kal_uint8 cmd, int WriteData);
61 extern void bq27541_parameter_dump(void);
62 #endif // _bq27541_SW_H_
63