The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [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 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef AKM8976_H |
| 20 | #define AKM8976_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #include <linux/ioctl.h> |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 22 | #define AKECS_MODE_MEASURE 0x00 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 24 | #define AKECS_MODE_PFFD 0x01 |
| 25 | #define AKECS_MODE_E2P_READ 0x02 |
| 26 | #define AKECS_MODE_POWERDOWN 0x03 |
| 27 | #define AKECS_MODE_MEASURE_SNG 0x10 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 29 | #define AKECS_MODE_MEASURE_SEQ 0x11 |
| 30 | #define CSPEC_AINT 0x01 |
| 31 | #define CSPEC_SNG_NUM 0x01 |
| 32 | #define CSPEC_SEQ_NUM 0x02 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 34 | #define CSPEC_SFRQ_32 0x00 |
| 35 | #define CSPEC_SFRQ_64 0x01 |
| 36 | #define CSPEC_MCS 0x07 |
| 37 | #define CSPEC_MKS 0x01 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 39 | #define CSPEC_INTEN 0x01 |
| 40 | #define RBUFF_SIZE 31 |
| 41 | #define MAX_CALI_SIZE 0x1000U |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 42 | #define AKECS_REG_ST 0xC0 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 44 | #define AKECS_REG_TMPS 0xC1 |
| 45 | #define AKECS_REG_MS1 0xE0 |
| 46 | #define AKECS_REG_MS2 0xE1 |
| 47 | #define AKECS_REG_MS3 0xE2 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 49 | #define AKMIO 0xA1 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 50 | #define ECS_IOCTL_INIT _IO(AKMIO, 0x01) |
| 51 | #define ECS_IOCTL_WRITE _IOW(AKMIO, 0x02, char[5]) |
| 52 | #define ECS_IOCTL_READ _IOWR(AKMIO, 0x03, char[5]) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | #define ECS_IOCTL_RESET _IO(AKMIO, 0x04) |
| 55 | #define ECS_IOCTL_INT_STATUS _IO(AKMIO, 0x05) |
| 56 | #define ECS_IOCTL_FFD_STATUS _IO(AKMIO, 0x06) |
| 57 | #define ECS_IOCTL_SET_MODE _IOW(AKMIO, 0x07, short) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 59 | #define ECS_IOCTL_GETDATA _IOR(AKMIO, 0x08, char[RBUFF_SIZE+1]) |
| 60 | #define ECS_IOCTL_GET_NUMFRQ _IOR(AKMIO, 0x09, char[2]) |
| 61 | #define ECS_IOCTL_SET_PERST _IO(AKMIO, 0x0A) |
| 62 | #define ECS_IOCTL_SET_G0RST _IO(AKMIO, 0x0B) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 64 | #define ECS_IOCTL_SET_YPR _IOW(AKMIO, 0x0C, short[12]) |
| 65 | #define ECS_IOCTL_GET_OPEN_STATUS _IOR(AKMIO, 0x0D, int) |
| 66 | #define ECS_IOCTL_GET_CLOSE_STATUS _IOR(AKMIO, 0x0E, int) |
| 67 | #define ECS_IOCTL_GET_CALI_DATA _IOR(AKMIO, 0x0F, char[MAX_CALI_SIZE]) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 69 | #define ECS_IOCTL_GET_DELAY _IOR(AKMIO, 0x30, short) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 70 | #define ECS_IOCTL_APP_SET_MODE _IOW(AKMIO, 0x10, short) |
| 71 | #define ECS_IOCTL_APP_SET_MFLAG _IOW(AKMIO, 0x11, short) |
| 72 | #define ECS_IOCTL_APP_GET_MFLAG _IOW(AKMIO, 0x12, 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 */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 74 | #define ECS_IOCTL_APP_SET_AFLAG _IOW(AKMIO, 0x13, short) |
| 75 | #define ECS_IOCTL_APP_GET_AFLAG _IOR(AKMIO, 0x14, short) |
| 76 | #define ECS_IOCTL_APP_SET_TFLAG _IOR(AKMIO, 0x15, short) |
| 77 | #define ECS_IOCTL_APP_GET_TFLAG _IOR(AKMIO, 0x16, short) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 79 | #define ECS_IOCTL_APP_RESET_PEDOMETER _IO(AKMIO, 0x17) |
| 80 | #define ECS_IOCTL_APP_SET_DELAY _IOW(AKMIO, 0x18, short) |
| 81 | #define ECS_IOCTL_APP_GET_DELAY ECS_IOCTL_GET_DELAY |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 82 | #define ECS_IOCTL_APP_SET_MVFLAG _IOW(AKMIO, 0x19, short) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 84 | #define ECS_IOCTL_APP_GET_MVFLAG _IOR(AKMIO, 0x1A, short) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 85 | #define ECS_IOCTL_SET_STEP_CNT _IOW(AKMIO, 0x20, short) |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 86 | #define ECS_RST 146 |
| 87 | #define ECS_CLK_ON 155 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
Elliott Hughes | c95eb57 | 2013-01-29 18:15:55 -0800 | [diff] [blame] | 89 | #define ECS_INTR 161 |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 90 | struct akm8976_platform_data { |
| 91 | int reset; |
| 92 | int clk_on; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 94 | int intr; |
| 95 | }; |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 96 | #endif |