diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/dt-bindings/clock/ast2600-clock.h | 3 | ||||
| -rw-r--r-- | include/uapi/linux/i3c/i3cdev.h | 38 |
2 files changed, 40 insertions, 1 deletions
diff --git a/include/dt-bindings/clock/ast2600-clock.h b/include/dt-bindings/clock/ast2600-clock.h index 4952f7683be7..ea637bb26f90 100644 --- a/include/dt-bindings/clock/ast2600-clock.h +++ b/include/dt-bindings/clock/ast2600-clock.h @@ -88,7 +88,8 @@ #define ASPEED_CLK_MAC3RCLK 69 #define ASPEED_CLK_MAC4RCLK 70 #define ASPEED_CLK_UART5 71 -#define ASPEED_CLK_MAX 72 +#define ASPEED_CLK_I3C 72 +#define ASPEED_CLK_MAX 73 /* Only list resets here that are not part of a gate */ #define ASPEED_RESET_ADC 55 diff --git a/include/uapi/linux/i3c/i3cdev.h b/include/uapi/linux/i3c/i3cdev.h new file mode 100644 index 000000000000..0897313f5516 --- /dev/null +++ b/include/uapi/linux/i3c/i3cdev.h @@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Copyright (c) 2019 Synopsys, Inc. and/or its affiliates. + * + * Author: Vitor Soares <vitor.soares@synopsys.com> + */ + +#ifndef _UAPI_I3C_DEV_H_ +#define _UAPI_I3C_DEV_H_ + +#include <linux/types.h> +#include <linux/ioctl.h> + +/* IOCTL commands */ +#define I3C_DEV_IOC_MAGIC 0x07 + +/** + * struct i3c_ioc_priv_xfer - I3C SDR ioctl private transfer + * @data: Holds pointer to userspace buffer with transmit data. + * @len: Length of data buffer buffers, in bytes. + * @rnw: encodes the transfer direction. true for a read, false for a write + */ +struct i3c_ioc_priv_xfer { + __u64 data; + __u16 len; + __u8 rnw; + __u8 pad[5]; +}; + + +#define I3C_PRIV_XFER_SIZE(N) \ + ((((sizeof(struct i3c_ioc_priv_xfer)) * (N)) < (1 << _IOC_SIZEBITS)) \ + ? ((sizeof(struct i3c_ioc_priv_xfer)) * (N)) : 0) + +#define I3C_IOC_PRIV_XFER(N) \ + _IOC(_IOC_READ|_IOC_WRITE, I3C_DEV_IOC_MAGIC, 30, I3C_PRIV_XFER_SIZE(N)) + +#endif |
