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