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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef AKM8975_H |
| 20 | #define AKM8975_H |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 21 | #include <linux/ioctl.h> |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 22 | #define AK8975_MODE_SNG_MEASURE 0x01 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 24 | #define AK8975_MODE_SELF_TEST 0x08 |
| 25 | #define AK8975_MODE_FUSE_ACCESS 0x0F |
| 26 | #define AK8975_MODE_POWER_DOWN 0x00 |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 27 | #define RBUFF_SIZE 8 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 29 | #define AK8975_REG_WIA 0x00 |
| 30 | #define AK8975_REG_INFO 0x01 |
| 31 | #define AK8975_REG_ST1 0x02 |
| 32 | #define AK8975_REG_HXL 0x03 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 34 | #define AK8975_REG_HXH 0x04 |
| 35 | #define AK8975_REG_HYL 0x05 |
| 36 | #define AK8975_REG_HYH 0x06 |
| 37 | #define AK8975_REG_HZL 0x07 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 39 | #define AK8975_REG_HZH 0x08 |
| 40 | #define AK8975_REG_ST2 0x09 |
| 41 | #define AK8975_REG_CNTL 0x0A |
| 42 | #define AK8975_REG_RSV 0x0B |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 44 | #define AK8975_REG_ASTC 0x0C |
| 45 | #define AK8975_REG_TS1 0x0D |
| 46 | #define AK8975_REG_TS2 0x0E |
| 47 | #define AK8975_REG_I2CDIS 0x0F |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 49 | #define AK8975_FUSE_ASAX 0x10 |
| 50 | #define AK8975_FUSE_ASAY 0x11 |
| 51 | #define AK8975_FUSE_ASAZ 0x12 |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 52 | #define AKMIO 0xA1 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 54 | #define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5]) |
| 55 | #define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5]) |
| 56 | #define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE]) |
| 57 | #define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12]) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 59 | #define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int) |
| 60 | #define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int) |
| 61 | #define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short) |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 62 | #define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 64 | #define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, short) |
| 65 | #define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short) |
| 66 | #define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short) |
| 67 | #define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 69 | #define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 70 | #define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) |
| 71 | #define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 72 | #define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 74 | #define ECS_INTR 140 |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 75 | struct akm8975_platform_data { |
| 76 | int intr; |
| 77 | }; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Colin Cross | b508876 | 2010-06-09 15:51:43 -0700 | [diff] [blame] | 79 | #endif |