aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/inv_mpu/compass/ami_hw.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/misc/inv_mpu/compass/ami_hw.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'drivers/misc/inv_mpu/compass/ami_hw.h')
-rw-r--r--drivers/misc/inv_mpu/compass/ami_hw.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/drivers/misc/inv_mpu/compass/ami_hw.h b/drivers/misc/inv_mpu/compass/ami_hw.h
new file mode 100644
index 00000000000..32a04e91cdc
--- /dev/null
+++ b/drivers/misc/inv_mpu/compass/ami_hw.h
@@ -0,0 +1,87 @@
1/*
2 * Copyright (C) 2010 Information System Products Co.,Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef AMI_HW_H
18#define AMI_HW_H
19
20#define AMI_I2C_BUS_NUM 2
21
22#ifdef AMI304_MODEL
23#define AMI_I2C_ADDRESS 0x0F
24#else
25#define AMI_I2C_ADDRESS 0x0E
26#endif
27
28#define AMI_GPIO_INT 152
29#define AMI_GPIO_DRDY 153
30
31/* AMI-Sensor Internal Register Address
32 *(Please refer to AMI-Sensor Specifications)
33 */
34#define AMI_MOREINFO_CMDCODE 0x0d
35#define AMI_WHOIAM_CMDCODE 0x0f
36#define AMI_REG_DATAX 0x10
37#define AMI_REG_DATAY 0x12
38#define AMI_REG_DATAZ 0x14
39#define AMI_REG_STA1 0x18
40#define AMI_REG_CTRL1 0x1b
41#define AMI_REG_CTRL2 0x1c
42#define AMI_REG_CTRL3 0x1d
43#define AMI_REG_B0X 0x20
44#define AMI_REG_B0Y 0x22
45#define AMI_REG_B0Z 0x24
46#define AMI_REG_CTRL5 0x40
47#define AMI_REG_CTRL4 0x5c
48#define AMI_REG_TEMP 0x60
49#define AMI_REG_DELAYX 0x68
50#define AMI_REG_DELAYY 0x6e
51#define AMI_REG_DELAYZ 0x74
52#define AMI_REG_OFFX 0x6c
53#define AMI_REG_OFFY 0x72
54#define AMI_REG_OFFZ 0x78
55#define AMI_FINEOUTPUT_X 0x90
56#define AMI_FINEOUTPUT_Y 0x92
57#define AMI_FINEOUTPUT_Z 0x94
58#define AMI_REG_SENX 0x96
59#define AMI_REG_SENY 0x98
60#define AMI_REG_SENZ 0x9a
61#define AMI_REG_GAINX 0x9c
62#define AMI_REG_GAINY 0x9e
63#define AMI_REG_GAINZ 0xa0
64#define AMI_GETVERSION_CMDCODE 0xe8
65#define AMI_SERIALNUMBER_CMDCODE 0xea
66#define AMI_REG_B0OTPX 0xa2
67#define AMI_REG_B0OTPY 0xb8
68#define AMI_REG_B0OTPZ 0xce
69#define AMI_REG_OFFOTPX 0xf8
70#define AMI_REG_OFFOTPY 0xfa
71#define AMI_REG_OFFOTPZ 0xfc
72
73/* AMI-Sensor Control Bit (Please refer to AMI-Sensor Specifications) */
74#define AMI_CTRL1_PC1 0x80
75#define AMI_CTRL1_FS1_FORCE 0x02
76#define AMI_CTRL1_ODR1 0x10
77#define AMI_CTRL2_DREN 0x08
78#define AMI_CTRL2_DRP 0x04
79#define AMI_CTRL3_FORCE_BIT 0x40
80#define AMI_CTRL3_B0_LO_BIT 0x10
81#define AMI_CTRL3_SRST_BIT 0x80
82#define AMI_CTRL4_HS 0xa07e
83#define AMI_CTRL4_AB 0x0001
84#define AMI_STA1_DRDY_BIT 0x40
85#define AMI_STA1_DOR_BIT 0x20
86
87#endif