1 2 #define FS_LTP_TEST_COMPONENT 0x00020999 3 #define FS_LTP_TEST_CLASS "ltp_test" 4 #define FS_LTP_TEST_HID "FS0999" 5 #define FS_LTP_TEST_DRIVER_NAME "FS LTP Test Driver" 6 #define FS_LTP_TEST_DEVICE_NAME "LTP Test" 7 #define FS_LTP_TEST_FILE_STATE "state" 8 #define FS_LTP_TEST_NOTIFY_STATUS 0x80 9 #define FS_LTP_TEST_STATUS_OFFLINE 0x00 10 #define FS_LTP_TEST_STATUS_ONLINE 0x01 11 #define FS_LTP_TEST_STATUS_UNKNOWN 0xFF 12 #define _COMPONENT FS_LTP_TEST_COMPONENT 13 #define FS_TLP_TEST_MODULE_NAME ("fs_ltp_test") 14 #define FS_NS_SYSTEM_BUS "_SB_" 15 #define FS_BATTERY_FORMAT_BIF "NNNNNNNNNSSSS" 16 #define FS_BATTERY_FORMAT_BST "NNNN" 17 18 19 #define FS_TYPE_ANY 0x00 20 #define FS_TYPE_INTEGER 0x01 /* Byte/Word/Dword/Zero/One/Ones */ 21 #define FS_TYPE_STRING 0x02 22 #define FS_TYPE_BUFFER 0x03 23 #define FS_TYPE_PACKAGE 0x04 /* byte_const, multiple data_term/Constant/super_name */ 24 #define FS_TYPE_FIELD_UNIT 0x05 25 #define FS_TYPE_DEVICE 0x06 /* Name, multiple Node */ 26 #define FS_TYPE_EVENT 0x07 27 #define FS_TYPE_METHOD 0x08 /* Name, byte_const, multiple Code */ 28 #define FS_TYPE_MUTEX 0x09 29 #define FS_TYPE_REGION 0x0A 30 #define FS_TYPE_POWER 0x0B /* Name,byte_const,word_const,multi Node */ 31 #define FS_TYPE_PROCESSOR 0x0C /* Name,byte_const,Dword_const,byte_const,multi nm_o */ 32 #define FS_TYPE_THERMAL 0x0D /* Name, multiple Node */ 33 #define FS_TYPE_BUFFER_FIELD 0x0E 34 #define FS_TYPE_DDB_HANDLE 0x0F 35 #define FS_TYPE_DEBUG_OBJECT 0x10 36 37 #define FS_TYPE_EXTERNAL_MAX 0x10 38 #define LTPMAJOR 256 39 40 /* Use 'k' as magic number */ 41 #define LTPFS_IOC_MAGIC 'k' 42 #define TOMINOR(x) ((x & 3) | ((x & 4) << 5)) 43 44 45 #define DEV_PATH "/dev" 46 #define LTP_FS_DIR_NAME "" 47 #define LTP_FS_DEV_NAME "LTPFS" 48 #define LTP_FS_DEV_NODE_PATH DEV_PATH "/" 49 #define LTP_FS_DEVICE_NAME DEV_PATH "/" LTP_FS_DEV_NAME 50 #define MINOR_SHIFT_BITS 3 51 #define MAX_PARTITIONS 8 /* partition 0 + 7 more possible due to 3 bit partition number field */ 52 #define MAX_NUM_DISKS 3 /* number of real devices */ 53 54 #define MPDEV_FLAG_CLEAR 0 55 #define MPDEV_FLAG_SET 1 56 57 typedef struct _ltpdev_cmd { 58 u_int32_t cmd; // input - 0==recover, 1==fail 59 u_int32_t status; // ouput - 0==success 60 } ltpdev_cmd_t; 61 62 typedef enum ltpdev_ioctl_cmds_s { 63 /* version commands */ 64 LTP_AIO_IOCTL_NUMBER = 0x5500, 65 LTP_BIO_IOCTL_NUMBER = 0x5501 66 } ltpdev_ioctl_cmds_t; 67 68 // define the ioctl cmds 69 #define LTPAIODEV_CMD _IOR( LTPMAJOR, LTP_AIO_IOCTL_NUMBER, ltpdev_cmd_t **) 70 #define LTPBIODEV_CMD _IOR( LTPMAJOR, LTP_BIO_IOCTL_NUMBER, ltpdev_cmd_t **) 71 72