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 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef __LINUX_CAPI_H__ |
| 13 | #define __LINUX_CAPI_H__ |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 14 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 15 | #include <asm/types.h> |
| 16 | #include <linux/ioctl.h> |
| 17 | #include <linux/kernelcapi.h> |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 18 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 19 | typedef struct capi_register_params { |
| 20 | __u32 level3cnt; |
| 21 | __u32 datablkcnt; |
| 22 | __u32 datablklen; |
| 23 | } capi_register_params; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 24 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 25 | #define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 26 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 27 | #define CAPI_MANUFACTURER_LEN 64 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 28 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | #define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 30 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 31 | typedef struct capi_version { |
| 32 | __u32 majorversion; |
| 33 | __u32 minorversion; |
| 34 | __u32 majormanuversion; |
| 35 | __u32 minormanuversion; |
| 36 | } capi_version; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 37 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 38 | #define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 39 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 40 | #define CAPI_SERIAL_LEN 8 |
| 41 | #define CAPI_GET_SERIAL _IOWR('C',0x08,int) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 42 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 43 | typedef struct capi_profile { |
| 44 | __u16 ncontroller; |
| 45 | __u16 nbchannel; |
| 46 | __u32 goptions; |
| 47 | __u32 support1; |
| 48 | __u32 support2; |
| 49 | __u32 support3; |
| 50 | __u32 reserved[6]; |
| 51 | __u32 manu[5]; |
| 52 | } capi_profile; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 53 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 54 | #define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 55 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 56 | typedef struct capi_manufacturer_cmd { |
| 57 | unsigned long cmd; |
| 58 | void __user *data; |
| 59 | } capi_manufacturer_cmd; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 60 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 61 | #define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 62 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 63 | #define CAPI_GET_ERRCODE _IOR('C',0x21, __u16) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 64 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 65 | #define CAPI_INSTALLED _IOR('C',0x22, __u16) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 66 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 67 | typedef union capi_ioctl_struct { |
| 68 | __u32 contr; |
| 69 | capi_register_params rparams; |
| 70 | __u8 manufacturer[CAPI_MANUFACTURER_LEN]; |
| 71 | capi_version version; |
| 72 | __u8 serial[CAPI_SERIAL_LEN]; |
| 73 | capi_profile profile; |
| 74 | capi_manufacturer_cmd cmd; |
| 75 | __u16 errcode; |
| 76 | } capi_ioctl_struct; |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 77 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 78 | #define CAPIFLAG_HIGHJACKING 0x0001 |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 79 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 80 | #define CAPI_GET_FLAGS _IOR('C',0x23, unsigned) |
| 81 | #define CAPI_SET_FLAGS _IOR('C',0x24, unsigned) |
| 82 | #define CAPI_CLR_FLAGS _IOR('C',0x25, unsigned) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 83 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 84 | #define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 85 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 86 | #define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned) |
Ben Cheng | 4b29af0 | 2012-03-07 16:14:53 -0800 | [diff] [blame^] | 87 | |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 88 | #endif |