1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12#ifndef AKM8976_H 13#define AKM8976_H 14 15#include <linux/ioctl.h> 16 17#define AKECS_MODE_MEASURE 0x00 18 19#define AKECS_MODE_PFFD 0x01 20#define AKECS_MODE_E2P_READ 0x02 21#define AKECS_MODE_POWERDOWN 0x03 22 23#define AKECS_MODE_MEASURE_SNG 0x10 24#define AKECS_MODE_MEASURE_SEQ 0x11 25 26#define CSPEC_AINT 0x01 27#define CSPEC_SNG_NUM 0x01 28#define CSPEC_SEQ_NUM 0x02 29#define CSPEC_SFRQ_32 0x00 30#define CSPEC_SFRQ_64 0x01 31#define CSPEC_MCS 0x07 32#define CSPEC_MKS 0x01 33#define CSPEC_INTEN 0x01 34 35#define RBUFF_SIZE 31 36#define MAX_CALI_SIZE 0x1000U 37 38#define AKECS_REG_ST 0xC0 39#define AKECS_REG_TMPS 0xC1 40#define AKECS_REG_MS1 0xE0 41#define AKECS_REG_MS2 0xE1 42#define AKECS_REG_MS3 0xE2 43 44#define AKMIO 0xA1 45 46#define ECS_IOCTL_INIT _IO(AKMIO, 0x01) 47#define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5]) 48#define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5]) 49#define ECS_IOCTL_RESET _IO(AKMIO, 0x04) 50#define ECS_IOCTL_INT_STATUS _IO(AKMIO, 0x05) 51#define ECS_IOCTL_FFD_STATUS _IO(AKMIO, 0x06) 52#define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x07, short) 53#define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE+1]) 54#define ECS_IOCTL_GET_NUMFRQ _IOR(AKMIO, 0x09, char[2]) 55#define ECS_IOCTL_SET_PERST _IO(AKMIO, 0x0A) 56#define ECS_IOCTL_SET_G0RST _IO(AKMIO, 0x0B) 57#define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12]) 58#define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int) 59#define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int) 60#define ECS_IOCTL_GET_CALI_DATA _IOR(AKMIO, 0x0F, char[MAX_CALI_SIZE]) 61#define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short) 62 63#define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short) 64#define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short) 65#define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short) 66#define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short) 67#define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short) 68#define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short) 69#define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short) 70#define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17) 71#define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short) 72#define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY 73#define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) 74#define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) 75 76#define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short) 77 78#define ECS_RST 146 79#define ECS_CLK_ON 155 80#define ECS_INTR 161 81 82struct akm8976_platform_data { 83 int reset; 84 int clk_on; 85 int intr; 86}; 87 88#endif 89 90