diff options
Diffstat (limited to 'drivers/misc/mpu3050/mpu-i2c.h')
-rw-r--r-- | drivers/misc/mpu3050/mpu-i2c.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/misc/mpu3050/mpu-i2c.h b/drivers/misc/mpu3050/mpu-i2c.h new file mode 100644 index 00000000000..0bbc8c64594 --- /dev/null +++ b/drivers/misc/mpu3050/mpu-i2c.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | $License: | ||
3 | Copyright (C) 2010 InvenSense Corporation, All Rights Reserved. | ||
4 | |||
5 | This program is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation; either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | $ | ||
18 | */ | ||
19 | /** | ||
20 | * @defgroup | ||
21 | * @brief | ||
22 | * | ||
23 | * @{ | ||
24 | * @file mpu-i2c.c | ||
25 | * @brief | ||
26 | * | ||
27 | * | ||
28 | */ | ||
29 | |||
30 | #ifndef __MPU_I2C_H__ | ||
31 | #define __MPU_I2C_H__ | ||
32 | |||
33 | #include <linux/i2c.h> | ||
34 | |||
35 | int sensor_i2c_write(struct i2c_adapter *i2c_adap, | ||
36 | unsigned char address, | ||
37 | unsigned int len, unsigned char const *data); | ||
38 | |||
39 | int sensor_i2c_write_register(struct i2c_adapter *i2c_adap, | ||
40 | unsigned char address, | ||
41 | unsigned char reg, unsigned char value); | ||
42 | |||
43 | int sensor_i2c_read(struct i2c_adapter *i2c_adap, | ||
44 | unsigned char address, | ||
45 | unsigned char reg, | ||
46 | unsigned int len, unsigned char *data); | ||
47 | |||
48 | int mpu_memory_read(struct i2c_adapter *i2c_adap, | ||
49 | unsigned char mpu_addr, | ||
50 | unsigned short mem_addr, | ||
51 | unsigned int len, unsigned char *data); | ||
52 | |||
53 | int mpu_memory_write(struct i2c_adapter *i2c_adap, | ||
54 | unsigned char mpu_addr, | ||
55 | unsigned short mem_addr, | ||
56 | unsigned int len, unsigned char const *data); | ||
57 | |||
58 | #endif /* __MPU_I2C_H__ */ | ||