0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _UAPI_LINUX_CROS_EC_DEV_H_
0009 #define _UAPI_LINUX_CROS_EC_DEV_H_
0010
0011 #include <linux/bits.h>
0012 #include <linux/ioctl.h>
0013 #include <linux/types.h>
0014
0015 #include <linux/platform_data/cros_ec_commands.h>
0016
0017 #define CROS_EC_DEV_VERSION "1.0.0"
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 struct cros_ec_readmem {
0028 uint32_t offset;
0029 uint32_t bytes;
0030 uint8_t buffer[EC_MEMMAP_SIZE];
0031 };
0032
0033 #define CROS_EC_DEV_IOC 0xEC
0034 #define CROS_EC_DEV_IOCXCMD _IOWR(CROS_EC_DEV_IOC, 0, struct cros_ec_command)
0035 #define CROS_EC_DEV_IOCRDMEM _IOWR(CROS_EC_DEV_IOC, 1, struct cros_ec_readmem)
0036 #define CROS_EC_DEV_IOCEVENTMASK _IO(CROS_EC_DEV_IOC, 2)
0037
0038 #endif