| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
| 2 | #ifndef _DRHYME_SENSOR_UAPI_H |
| 3 | #define _DRHYME_SENSOR_UAPI_H |
| 4 | |
| 5 | #include <linux/ioctl.h> |
| 6 | #include <linux/types.h> |
| 7 | |
| 8 | #define DRHYME_IOCTL_MAGIC 'D' |
| 9 | |
| 10 | struct drhyme_sensor_status { |
| 11 | __u32 abi_version; |
| 12 | __u32 enabled; |
| 13 | __u32 config; |
| 14 | __u32 reserved; |
| 15 | __u64 read_count; |
| 16 | }; |
| 17 | |
| 18 | struct drhyme_sensor_config { |
| 19 | __u32 config; |
| 20 | __u32 reserved; |
| 21 | }; |
| 22 | |
| 23 | #define DRHYME_IOCTL_RESET \ |
| 24 | _IO(DRHYME_IOCTL_MAGIC, 0x00) |
| 25 | #define DRHYME_IOCTL_GET_STATUS \ |
| 26 | _IOR(DRHYME_IOCTL_MAGIC, 0x01, struct drhyme_sensor_status) |
| 27 | #define DRHYME_IOCTL_SET_CONFIG \ |
| 28 | _IOW(DRHYME_IOCTL_MAGIC, 0x02, struct drhyme_sensor_config) |
| 29 | |
| 30 | #endif |