gio.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __ASM_SH_LANDISK_GIO_H
  2. #define __ASM_SH_LANDISK_GIO_H
  3. #include <linux/ioctl.h>
  4. /* version */
  5. #define VERSION_STR "1.00"
  6. /* Driver name */
  7. #define GIO_DRIVER_NAME "/dev/giodrv"
  8. /* Use 'k' as magic number */
  9. #define GIODRV_IOC_MAGIC 'k'
  10. #define GIODRV_IOCRESET _IO(GIODRV_IOC_MAGIC, 0)
  11. /*
  12. * S means "Set" through a ptr,
  13. * T means "Tell" directly
  14. * G means "Get" (to a pointed var)
  15. * Q means "Query", response is on the return value
  16. * X means "eXchange": G and S atomically
  17. * H means "sHift": T and Q atomically
  18. */
  19. #define GIODRV_IOCSGIODATA1 _IOW(GIODRV_IOC_MAGIC, 1, unsigned char *)
  20. #define GIODRV_IOCGGIODATA1 _IOR(GIODRV_IOC_MAGIC, 2, unsigned char *)
  21. #define GIODRV_IOCSGIODATA2 _IOW(GIODRV_IOC_MAGIC, 3, unsigned short *)
  22. #define GIODRV_IOCGGIODATA2 _IOR(GIODRV_IOC_MAGIC, 4, unsigned short *)
  23. #define GIODRV_IOCSGIODATA4 _IOW(GIODRV_IOC_MAGIC, 5, unsigned long *)
  24. #define GIODRV_IOCGGIODATA4 _IOR(GIODRV_IOC_MAGIC, 6, unsigned long *)
  25. #define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC, 7, unsigned long *)
  26. #define GIODRV_IOCHARDRESET _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */
  27. #define GIODRV_IOC_MAXNR 8
  28. #define GIO_READ 0x00000000
  29. #define GIO_WRITE 0x00000001
  30. #endif /* __ASM_SH_LANDISK_GIO_H */