The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -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 __LINUX_CAPI_H__ |
| 13 | #define __LINUX_CAPI_H__ |
| 14 | |
| 15 | #include <asm/types.h> |
| 16 | #include <linux/ioctl.h> |
| 17 | #include <linux/kernelcapi.h> |
| 18 | |
| 19 | typedef struct capi_register_params { |
| 20 | __u32 level3cnt; |
| 21 | __u32 datablkcnt; |
| 22 | __u32 datablklen; |
| 23 | } capi_register_params; |
| 24 | |
| 25 | #define CAPI_REGISTER _IOW('C',0x01,struct capi_register_params) |
| 26 | |
| 27 | #define CAPI_MANUFACTURER_LEN 64 |
| 28 | |
| 29 | #define CAPI_GET_MANUFACTURER _IOWR('C',0x06,int) |
| 30 | |
| 31 | typedef struct capi_version { |
| 32 | __u32 majorversion; |
| 33 | __u32 minorversion; |
| 34 | __u32 majormanuversion; |
| 35 | __u32 minormanuversion; |
| 36 | } capi_version; |
| 37 | |
| 38 | #define CAPI_GET_VERSION _IOWR('C',0x07,struct capi_version) |
| 39 | |
| 40 | #define CAPI_SERIAL_LEN 8 |
| 41 | #define CAPI_GET_SERIAL _IOWR('C',0x08,int) |
| 42 | |
| 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; |
| 53 | |
| 54 | #define CAPI_GET_PROFILE _IOWR('C',0x09,struct capi_profile) |
| 55 | |
| 56 | typedef struct capi_manufacturer_cmd { |
| 57 | unsigned long cmd; |
| 58 | void __user *data; |
| 59 | } capi_manufacturer_cmd; |
| 60 | |
| 61 | #define CAPI_MANUFACTURER_CMD _IOWR('C',0x20, struct capi_manufacturer_cmd) |
| 62 | |
| 63 | #define CAPI_GET_ERRCODE _IOR('C',0x21, __u16) |
| 64 | |
| 65 | #define CAPI_INSTALLED _IOR('C',0x22, __u16) |
| 66 | |
| 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; |
| 77 | |
| 78 | #define CAPIFLAG_HIGHJACKING 0x0001 |
| 79 | |
| 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) |
| 83 | |
| 84 | #define CAPI_NCCI_OPENCOUNT _IOR('C',0x26, unsigned) |
| 85 | |
| 86 | #define CAPI_NCCI_GETUNIT _IOR('C',0x27, unsigned) |
| 87 | |
| 88 | #endif |