Files
android/drivers/misc/mediatek/sensors-1.0/accelerometer/mpu6050g/mpu6050.h
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

65 lines
2.1 KiB
C

/*****************************************************************************
* Copyright (C) 2016 MediaTek Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* 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 http://www.gnu.org/licenses/gpl-2.0.html for more details.
*
*****************************************************************************/
#ifndef MPU6050_H
#define MPU6050_H
#include <linux/ioctl.h>
#define MPU6050_I2C_SLAVE_ADDR 0xD0
/* MPU6050 Register Map (Please refer to MPU6050 Specifications) */
#define MPU6050_REG_DEVID 0x75
#define MPU6050_REG_BW_RATE 0x1A
#define MPU6050_REG_POWER_CTL 0x6B
#define MPU6050_REG_POWER_CTL2 0x6C
#define MPU6050_REG_INT_ENABLE 0x38
#define MPU6050_REG_DATA_FORMAT 0x1C
#define MPU6050_REG_DATAX0 0x3B
#define MPU6050_REG_DATAY0 0x3D
#define MPU6050_REG_DATAZ0 0x3F
#define MPU6050_REG_RESET 0x68
/* register Value */
#define MPU6050_FIXED_DEVID 0x68 /* or 0x69 */
/* delay(ms) */
#define MPU6050_BW_260HZ 0x00 /* 0 */
#define MPU6050_BW_184HZ 0x01 /* 2.0 */
#define MPU6050_BW_94HZ 0x02 /* 3.0 */
#define MPU6050_BW_44HZ 0x03 /* 4.9 */
#define MPU6050_BW_21HZ 0x04 /* 8.5 */
#define MPU6050_BW_10HZ 0x05 /* 13.8 */
#define MPU6050_BW_5HZ 0x06 /* 19.0 */
#define MPU6050_DEV_RESET 0x80
/* #define MPU6050_FULL_RES 0x08 */
#define MPU6050_RANGE_2G (0x00 << 3)
#define MPU6050_RANGE_4G (0x01 << 3)
#define MPU6050_RANGE_8G (0x02 << 3)
#define MPU6050_RANGE_16G (0x03 << 3)
/* #define MPU6050_SELF_TEST 0x80 */
/* enable low power sleep mode */
#define MPU6050_SLEEP 0x40
#define MPU6050_BUFSIZE 256
extern int MPU6050_gyro_power(void);
extern int MPU6050_gyro_mode(void);
#endif