1 /* For RockChip android platform. 2 * 3 * mir3da.h - Linux kernel modules for 3-Axis Accelerometer 4 * 5 * Copyright (C) 2011-2013 MiraMEMS Sensing Technology Co., Ltd. 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 */ 17 18 #ifndef __MIR3DA_STANDARD_H__ 19 #define __MIR3DA_STANDARD_H__ 20 21 #include <linux/ioctl.h> 22 #include <linux/kernel.h> 23 #include "da223_core.h" 24 25 #define DRI_VER "1.0" 26 #define MIR3DA_I2C_ADDR 0x26//0x26<-> SD0=GND;0x27<-> SD0=High 27 28 #define MIR3DA_ACC_IOCTL_BASE 88 29 #define IOCTL_INDEX_BASE 0x00 30 31 #define MIR3DA_ACC_IOCTL_SET_DELAY _IOW(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE, int) 32 #define MIR3DA_ACC_IOCTL_GET_DELAY _IOR(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+1, int) 33 #define MIR3DA_ACC_IOCTL_SET_ENABLE _IOW(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+2, int) 34 #define MIR3DA_ACC_IOCTL_GET_ENABLE _IOR(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+3, int) 35 #define MIR3DA_ACC_IOCTL_SET_G_RANGE _IOW(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+4, int) 36 #define MIR3DA_ACC_IOCTL_GET_G_RANGE _IOR(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+5, int) 37 38 #define MIR3DA_ACC_IOCTL_GET_COOR_XYZ _IOW(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+22, int) 39 #define MIR3DA_ACC_IOCTL_CALIBRATION _IOW(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+23, int) 40 #define MIR3DA_ACC_IOCTL_UPDATE_OFFSET _IOW(MIR3DA_ACC_IOCTL_BASE, IOCTL_INDEX_BASE+24, int) 41 42 #endif /* !__MIR3DA_STANDARD_H__ */ 43 44 45