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 _UAPI_LINUX_SURFACE_AGGREGATOR_CDEV_H 20 #define _UAPI_LINUX_SURFACE_AGGREGATOR_CDEV_H 21 #include <linux/ioctl.h> 22 #include <linux/types.h> 23 enum ssam_cdev_request_flags { 24 SSAM_CDEV_REQUEST_HAS_RESPONSE = 0x01, 25 SSAM_CDEV_REQUEST_UNSEQUENCED = 0x02, 26 }; 27 struct ssam_cdev_request { 28 __u8 target_category; 29 __u8 target_id; 30 __u8 command_id; 31 __u8 instance_id; 32 __u16 flags; 33 __s16 status; 34 struct { 35 __u64 data; 36 __u16 length; 37 __u8 __pad[6]; 38 } payload; 39 struct { 40 __u64 data; 41 __u16 length; 42 __u8 __pad[6]; 43 } response; 44 } __attribute__((__packed__)); 45 struct ssam_cdev_notifier_desc { 46 __s32 priority; 47 __u8 target_category; 48 } __attribute__((__packed__)); 49 struct ssam_cdev_event_desc { 50 struct { 51 __u8 target_category; 52 __u8 target_id; 53 __u8 cid_enable; 54 __u8 cid_disable; 55 } reg; 56 struct { 57 __u8 target_category; 58 __u8 instance; 59 } id; 60 __u8 flags; 61 } __attribute__((__packed__)); 62 struct ssam_cdev_event { 63 __u8 target_category; 64 __u8 target_id; 65 __u8 command_id; 66 __u8 instance_id; 67 __u16 length; 68 __u8 data[]; 69 } __attribute__((__packed__)); 70 #define SSAM_CDEV_REQUEST _IOWR(0xA5, 1, struct ssam_cdev_request) 71 #define SSAM_CDEV_NOTIF_REGISTER _IOW(0xA5, 2, struct ssam_cdev_notifier_desc) 72 #define SSAM_CDEV_NOTIF_UNREGISTER _IOW(0xA5, 3, struct ssam_cdev_notifier_desc) 73 #define SSAM_CDEV_EVENT_ENABLE _IOW(0xA5, 4, struct ssam_cdev_event_desc) 74 #define SSAM_CDEV_EVENT_DISABLE _IOW(0xA5, 5, struct ssam_cdev_event_desc) 75 #endif 76