summaryrefstree
path: root/kernel/include/linux/power/s2mg001_fuelgauge.h
blob: 33a8d4e8156772937e95811afec101c5fbc90cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
 * s2mg001_fuelgauge.h
 * Samsung S2MG001 Fuel Gauge Header
 *
 * Copyright (C) 2012 Samsung Electronics, Inc.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef __S2MG001_FUELGAUGE_H
#define __S2MG001_FUELGAUGE_H __FILE__

#if defined(ANDROID_ALARM_ACTIVATED)
#include <linux/android_alarm.h>
#endif

/* Slave address should be shifted to the right 1bit.
 * R/W bit should NOT be included.
 */
#define SEC_FUELGAUGE_I2C_SLAVEADDR 0x76

#define S2MG001_REG_STATUS		0x00
#define S2MG001_REG_IRQ			0x02
#define S2MG001_REG_RVBAT		0x04
#define S2MG001_REG_ROCV		0x06
#define S2MG001_REG_RSOC		0x0A
#define S2MG001_REG_RTEMP		0x0E
#define S2MG001_REG_RBATCAP		0x10
#define S2MG001_REG_RZADJ		0x12
#define S2MG001_REG_RBATZ0		0x14
#define S2MG001_REG_RBATZ1		0x16
#define S2MG001_REG_IRQ_LVL		0x18
#define S2MG001_REG_START		0x1A

struct battery_data_t {
	u8 *type_str;
};

struct sec_fg_info {
	bool dummy;
};

#endif /* __S2MG001_FUELGAUGE_H */