18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ASM_SH_LANDISK_GIO_H 38c2ecf20Sopenharmony_ci#define __ASM_SH_LANDISK_GIO_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/ioctl.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* version */ 88c2ecf20Sopenharmony_ci#define VERSION_STR "1.00" 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* Driver name */ 118c2ecf20Sopenharmony_ci#define GIO_DRIVER_NAME "/dev/giodrv" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* Use 'k' as magic number */ 148c2ecf20Sopenharmony_ci#define GIODRV_IOC_MAGIC 'k' 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define GIODRV_IOCRESET _IO(GIODRV_IOC_MAGIC, 0) 178c2ecf20Sopenharmony_ci/* 188c2ecf20Sopenharmony_ci * S means "Set" through a ptr, 198c2ecf20Sopenharmony_ci * T means "Tell" directly 208c2ecf20Sopenharmony_ci * G means "Get" (to a pointed var) 218c2ecf20Sopenharmony_ci * Q means "Query", response is on the return value 228c2ecf20Sopenharmony_ci * X means "eXchange": G and S atomically 238c2ecf20Sopenharmony_ci * H means "sHift": T and Q atomically 248c2ecf20Sopenharmony_ci */ 258c2ecf20Sopenharmony_ci#define GIODRV_IOCSGIODATA1 _IOW(GIODRV_IOC_MAGIC, 1, unsigned char *) 268c2ecf20Sopenharmony_ci#define GIODRV_IOCGGIODATA1 _IOR(GIODRV_IOC_MAGIC, 2, unsigned char *) 278c2ecf20Sopenharmony_ci#define GIODRV_IOCSGIODATA2 _IOW(GIODRV_IOC_MAGIC, 3, unsigned short *) 288c2ecf20Sopenharmony_ci#define GIODRV_IOCGGIODATA2 _IOR(GIODRV_IOC_MAGIC, 4, unsigned short *) 298c2ecf20Sopenharmony_ci#define GIODRV_IOCSGIODATA4 _IOW(GIODRV_IOC_MAGIC, 5, unsigned long *) 308c2ecf20Sopenharmony_ci#define GIODRV_IOCGGIODATA4 _IOR(GIODRV_IOC_MAGIC, 6, unsigned long *) 318c2ecf20Sopenharmony_ci#define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC, 7, unsigned long *) 328c2ecf20Sopenharmony_ci#define GIODRV_IOCHARDRESET _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */ 338c2ecf20Sopenharmony_ci#define GIODRV_IOC_MAXNR 8 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define GIO_READ 0x00000000 368c2ecf20Sopenharmony_ci#define GIO_WRITE 0x00000001 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#endif /* __ASM_SH_LANDISK_GIO_H */ 39