Merge tag 'v3.10.55' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-mt8127 / tcl8127_tb_c_l / alsps / APDS9930.h
CommitLineData
6fa3eb70
S
1/*
2 *
3 * This software is licensed under the terms of the GNU General Public
4 * License version 2, as published by the Free Software Foundation, and
5 * may be copied, distributed, and modified under those terms.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13/*
14 * Definitions for APDS9930 als/ps sensor chip.
15 */
16#ifndef __APDS9930_H__
17#define __APDS9930_H__
18
19#include <linux/ioctl.h>
20
21extern int APDS9930_CMM_PPCOUNT_VALUE;
22extern int APDS9930_CMM_CONTROL_VALUE;
23extern int ZOOM_TIME;
24
25#define APDS9930_CMM_ENABLE 0X80
26#define APDS9930_CMM_ATIME 0X81
27#define APDS9930_CMM_PTIME 0X82
28#define APDS9930_CMM_WTIME 0X83
29/*for interrup work mode support -- by liaoxl.lenovo 12.08.2011*/
30#define APDS9930_CMM_INT_LOW_THD_LOW 0X88
31#define APDS9930_CMM_INT_LOW_THD_HIGH 0X89
32#define APDS9930_CMM_INT_HIGH_THD_LOW 0X8A
33#define APDS9930_CMM_INT_HIGH_THD_HIGH 0X8B
34#define APDS9930_CMM_Persistence 0X8C
35#define APDS9930_CMM_STATUS 0X93
36#define TAOS_TRITON_CMD_REG 0X80
37#define TAOS_TRITON_CMD_SPL_FN 0x60
38
39#define APDS9930_CMM_CONFIG 0X8D
40#define APDS9930_CMM_PPCOUNT 0X8E
41#define APDS9930_CMM_CONTROL 0X8F
42
43#define APDS9930_CMM_PDATA_L 0X98
44#define APDS9930_CMM_PDATA_H 0X99
45#define APDS9930_CMM_C0DATA_L 0X94
46#define APDS9930_CMM_C0DATA_H 0X95
47#define APDS9930_CMM_C1DATA_L 0X96
48#define APDS9930_CMM_C1DATA_H 0X97
49
50
51#define APDS9930_SUCCESS 0
52#define APDS9930_ERR_I2C -1
53#define APDS9930_ERR_STATUS -3
54#define APDS9930_ERR_SETUP_FAILURE -4
55#define APDS9930_ERR_GETGSENSORDATA -5
56#define APDS9930_ERR_IDENTIFICATION -6
57
58
59#endif
60