1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 #ifndef _UAPI_LINUX_CROS_EC_DEV_H_
   9 #define _UAPI_LINUX_CROS_EC_DEV_H_
  10 
  11 #include <linux/bits.h>
  12 #include <linux/ioctl.h>
  13 #include <linux/types.h>
  14 
  15 #include <linux/platform_data/cros_ec_commands.h>
  16 
  17 #define CROS_EC_DEV_VERSION "1.0.0"
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 struct cros_ec_readmem {
  28         uint32_t offset;
  29         uint32_t bytes;
  30         uint8_t buffer[EC_MEMMAP_SIZE];
  31 };
  32 
  33 #define CROS_EC_DEV_IOC       0xEC
  34 #define CROS_EC_DEV_IOCXCMD   _IOWR(CROS_EC_DEV_IOC, 0, struct cros_ec_command)
  35 #define CROS_EC_DEV_IOCRDMEM  _IOWR(CROS_EC_DEV_IOC, 1, struct cros_ec_readmem)
  36 #define CROS_EC_DEV_IOCEVENTMASK _IO(CROS_EC_DEV_IOC, 2)
  37 
  38 #endif