github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/netbsd/dev_i2c.txt (about)

     1  # Copyright 2018 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  # Autogenerated by sys2syz
     4  
     5  include <dev/i2c/i2c_io.h>
     6  
     7  resource fd_i2c[fd]
     8  
     9  openat$i2c(fd const[AT_FDCWD], file ptr[in, string["/dev/i2c"]], flags flags[open_flags], mode const[0]) fd_i2c
    10  
    11  ioctl$I2C_IOCTL_EXEC(fd fd_i2c, cmd const[I2C_IOCTL_EXEC], arg ptr[in, i2c_ioctl_exec])
    12  
    13  i2c_ioctl_exec {
    14  	iie_op		flags[i2c_op_t_flags, int8]
    15  	iie_addr	int16
    16  	iie_cmd		buffer[in]
    17  	iie_cmdlen	len[iie_cmd, intptr]
    18  	iie_buf		buffer[in]
    19  	iie_buflen	len[iie_buf, intptr]
    20  }
    21  
    22  i2c_op_t_flags = I2C_OP_READ, I2C_OP_READ_WITH_STOP, I2C_OP_WRITE, I2C_OP_WRITE_WITH_STOP, I2C_OP_READ_BLOCK, I2C_OP_WRITE_BLOCK