aboutsummaryrefslogtreecommitdiffstats
path: root/sys/netbsd/dev_i2c.txt
blob: 5c65068f41e8dff7fdbeee2a2db3da6a44e2fb76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright 2018 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
# Autogenerated by sys2syz

include <dev/i2c/i2c_io.h>

resource fd_i2c[fd]

openat$i2c(fd const[AT_FDCWD], file ptr[in, string["/dev/i2c"]], flags flags[open_flags], mode const[0]) fd_i2c

ioctl$I2C_IOCTL_EXEC(fd fd_i2c, cmd const[I2C_IOCTL_EXEC], arg ptr[in, i2c_ioctl_exec])

i2c_ioctl_exec {
	iie_op		flags[i2c_op_t_flags, int8]
	iie_addr	int16
	iie_cmd		buffer[in]
	iie_cmdlen	len[iie_cmd, intptr]
	iie_buf		buffer[in]
	iie_buflen	len[iie_buf, intptr]
}

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