Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 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 AKM8975_H |
| 13 | #define AKM8975_H |
| 14 | |
| 15 | #include <linux/ioctl.h> |
| 16 | |
| 17 | #define AK8975_MODE_SNG_MEASURE 0x01 |
| 18 | #define AK8975_MODE_SELF_TEST 0x08 |
| 19 | #define AK8975_MODE_FUSE_ACCESS 0x0F |
| 20 | #define AK8975_MODE_POWER_DOWN 0x00 |
| 21 | |
| 22 | #define RBUFF_SIZE 8 |
| 23 | |
| 24 | #define AK8975_REG_WIA 0x00 |
| 25 | #define AK8975_REG_INFO 0x01 |
| 26 | #define AK8975_REG_ST1 0x02 |
| 27 | #define AK8975_REG_HXL 0x03 |
| 28 | #define AK8975_REG_HXH 0x04 |
| 29 | #define AK8975_REG_HYL 0x05 |
| 30 | #define AK8975_REG_HYH 0x06 |
| 31 | #define AK8975_REG_HZL 0x07 |
| 32 | #define AK8975_REG_HZH 0x08 |
| 33 | #define AK8975_REG_ST2 0x09 |
| 34 | #define AK8975_REG_CNTL 0x0A |
| 35 | #define AK8975_REG_RSV 0x0B |
| 36 | #define AK8975_REG_ASTC 0x0C |
| 37 | #define AK8975_REG_TS1 0x0D |
| 38 | #define AK8975_REG_TS2 0x0E |
| 39 | #define AK8975_REG_I2CDIS 0x0F |
| 40 | |
| 41 | #define AK8975_FUSE_ASAX 0x10 |
| 42 | #define AK8975_FUSE_ASAY 0x11 |
| 43 | #define AK8975_FUSE_ASAZ 0x12 |
| 44 | |
| 45 | #define AKMIO 0xA1 |
| 46 | |
| 47 | #define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5]) |
| 48 | #define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5]) |
| 49 | #define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE]) |
| 50 | #define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12]) |
| 51 | #define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int) |
| 52 | #define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int) |
| 53 | #define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short) |
| 54 | |
| 55 | #define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short) |
| 56 | #define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short) |
| 57 | #define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short) |
| 58 | #define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short) |
| 59 | #define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short) |
| 60 | #define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY |
| 61 | #define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) |
| 62 | #define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) |
| 63 | #define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short) |
| 64 | |
| 65 | #define ECS_INTR 140 |
| 66 | |
| 67 | struct akm8975_platform_data { |
| 68 | int intr; |
| 69 | }; |
| 70 | |
| 71 | #endif |
| 72 | |