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