162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef __ASM_SH_LANDISK_GIO_H
362306a36Sopenharmony_ci#define __ASM_SH_LANDISK_GIO_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/ioctl.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* version */
862306a36Sopenharmony_ci#define VERSION_STR	"1.00"
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/* Driver name */
1162306a36Sopenharmony_ci#define GIO_DRIVER_NAME		"/dev/giodrv"
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci/* Use 'k' as magic number */
1462306a36Sopenharmony_ci#define GIODRV_IOC_MAGIC  'k'
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define GIODRV_IOCRESET    _IO(GIODRV_IOC_MAGIC, 0)
1762306a36Sopenharmony_ci/*
1862306a36Sopenharmony_ci * S means "Set" through a ptr,
1962306a36Sopenharmony_ci * T means "Tell" directly
2062306a36Sopenharmony_ci * G means "Get" (to a pointed var)
2162306a36Sopenharmony_ci * Q means "Query", response is on the return value
2262306a36Sopenharmony_ci * X means "eXchange": G and S atomically
2362306a36Sopenharmony_ci * H means "sHift": T and Q atomically
2462306a36Sopenharmony_ci */
2562306a36Sopenharmony_ci#define GIODRV_IOCSGIODATA1   _IOW(GIODRV_IOC_MAGIC,  1, unsigned char *)
2662306a36Sopenharmony_ci#define GIODRV_IOCGGIODATA1   _IOR(GIODRV_IOC_MAGIC,  2, unsigned char *)
2762306a36Sopenharmony_ci#define GIODRV_IOCSGIODATA2   _IOW(GIODRV_IOC_MAGIC,  3, unsigned short *)
2862306a36Sopenharmony_ci#define GIODRV_IOCGGIODATA2   _IOR(GIODRV_IOC_MAGIC,  4, unsigned short *)
2962306a36Sopenharmony_ci#define GIODRV_IOCSGIODATA4   _IOW(GIODRV_IOC_MAGIC,  5, unsigned long *)
3062306a36Sopenharmony_ci#define GIODRV_IOCGGIODATA4   _IOR(GIODRV_IOC_MAGIC,  6, unsigned long *)
3162306a36Sopenharmony_ci#define GIODRV_IOCSGIOSETADDR _IOW(GIODRV_IOC_MAGIC,  7, unsigned long *)
3262306a36Sopenharmony_ci#define GIODRV_IOCHARDRESET   _IO(GIODRV_IOC_MAGIC, 8) /* debugging tool */
3362306a36Sopenharmony_ci#define GIODRV_IOC_MAXNR 8
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci#define GIO_READ 0x00000000
3662306a36Sopenharmony_ci#define GIO_WRITE 0x00000001
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#endif /* __ASM_SH_LANDISK_GIO_H  */
39