Skip to content

Instantly share code, notes, and snippets.

@srikanth007m
Created August 4, 2017 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srikanth007m/5df24160bfc04d4593d7ae8e53047a90 to your computer and use it in GitHub Desktop.
Save srikanth007m/5df24160bfc04d4593d7ae8e53047a90 to your computer and use it in GitHub Desktop.
include <asm/ioctl.h>
include <../include/linux/qdsp6v2/usf.h>
resource fd_usfdev[fd]
syz_open_dev$usfdev(dev ptr[in, string["/dev/usf#"]], id intptr, flags flags[open_flags]) fd_usfdev
ioctl$US_SET_TX_INFO(fd fd_usfdev, cmd const[US_SET_TX_INFO], arg ptr[in, us_tx_info_type])
ioctl$US_START_TX(fd fd_usfdev, cmd const[US_START_TX], arg const[0])
ioctl$US_GET_TX_UPDATE(fd fd_usfdev, cmd const[US_GET_TX_UPDATE], arg ptr[inout, us_tx_update_info_type])
ioctl$US_SET_RX_INFO(fd fd_usfdev, cmd const[US_SET_RX_INFO], arg ptr[in, us_rx_info_type])
ioctl$US_SET_RX_UPDATE(fd fd_usfdev, cmd const[US_SET_RX_UPDATE], arg ptr[inout, us_rx_update_info_type])
ioctl$US_START_RX(fd fd_usfdev, cmd const[US_START_RX], arg const[0])
ioctl$US_STOP_TX(fd fd_usfdev, cmd const[US_STOP_TX], arg const[0])
ioctl$US_STOP_RX(fd fd_usfdev, cmd const[US_STOP_RX], arg const[0])
ioctl$US_GET_VERSION(fd fd_usfdev, cmd const[US_GET_VERSION], arg ptr[inout, us_version_info_type])
ioctl$US_SET_TX_STREAM_PARAM(fd fd_usfdev, cmd const[US_SET_TX_STREAM_PARAM], arg ptr[in, us_stream_param_type])
ioctl$US_GET_TX_STREAM_PARAM(fd fd_usfdev, cmd const[US_GET_TX_STREAM_PARAM], arg ptr[inout, us_stream_param_type])
ioctl$US_SET_RX_STREAM_PARAM(fd fd_usfdev, cmd const[US_SET_RX_STREAM_PARAM], arg ptr[in, us_stream_param_type])
ioctl$US_GET_RX_STREAM_PARAM(fd fd_usfdev, cmd const[US_GET_RX_STREAM_PARAM], arg ptr[inout, us_stream_param_type])
us_tx_info_type {
us_xx_info us_xx_info_type
input_info us_input_info_type
}
us_xx_info_type {
client_name ptr[in, int8]
dev_id int32
stream_format int32
sample_rate int32
buf_size int32
buf_num int16
port_cnt int16
port_id array[int8, 8]
bits_per_sample int16
params_data_size int16
params_data ptr[in, int8]
max_get_set_param_buf_size int32
}
us_input_info_type {
tsc_x_dim array[int32, 2]
tsc_y_dim array[int32, 2]
tsc_z_dim array[int32, 2]
tsc_x_tilt array[int32, 2]
tsc_y_tilt array[int32, 2]
tsc_pressure array[int32, 2]
req_buttons_bitmap int16
event_types int16
conflicting_event_types int16
}
us_tx_update_info_type {
event_counter int16
event ptr[inout, usf_event_type]
free_region int32
timeout flags[us_timeout_flags, int32]
event_filters int16
params_data_size int16
params_data ptr[in, int8]
ready_region int32
}
usf_event_type {
seq_num int32
timestamp int32
event_type_ind int16
event_data usf_event_type_union
}
usf_event_type_union [
point_event point_event_type
mouse_event mouse_event_type
key_event key_event_type
]
point_event_type {
coordinates array[int32, 3]
inclinations array[int32, 2]
pressure int32:10
buttons_state_bitmap flags[usf_point_event, int16]
}
mouse_event_type {
rels array[int32, 3]
buttons_states flags[usf_point_event, int16]
}
key_event_type {
key int32
key_state flags[usf_point_event, int8]
}
us_rx_info_type {
us_xx_info us_xx_info_type
}
us_rx_update_info_type {
ready_region int32
params_data_size int16
params_data ptr[in, int8]
free_region int32
}
us_version_info_type {
buf_size int16
pbuf ptr[inout, int8]
}
us_stream_param_type {
module_id int32
param_id int32
buf_size int32
pbuf ptr[inout, int8]
}
define USF_NO_WAIT_TIMEOUT 0x00000000
define USF_INFINITIVE_TIMEOUT 0xffffffff
define USF_DEFAULT_TIMEOUT 0xfffffffe
us_timeout_flags = USF_NO_WAIT_TIMEOUT, USF_INFINITIVE_TIMEOUT, USF_DEFAULT_TIMEOUT
usf_point_event = 0, 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment