spi-topcliff-pch: Fix issue for transmitting over 4KByte
[zen-stable.git] / include / linux / ppdev.h
blobdc18c5d23ebe4086518512ca8bb2cd8dfd8157bd
1 /*
2 * linux/include/linux/ppdev.h
4 * User-space parallel port device driver (header file).
6 * Copyright (C) 1998-9 Tim Waugh <tim@cyberelk.demon.co.uk>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
13 * Added PPGETTIME/PPSETTIME, Fred Barnes, 1999
14 * Added PPGETMODES/PPGETMODE/PPGETPHASE, Fred Barnes <frmb2@ukc.ac.uk>, 03/01/2001
17 #define PP_IOCTL 'p'
19 /* Set mode for read/write (e.g. IEEE1284_MODE_EPP) */
20 #define PPSETMODE _IOW(PP_IOCTL, 0x80, int)
22 /* Read status */
23 #define PPRSTATUS _IOR(PP_IOCTL, 0x81, unsigned char)
24 #define PPWSTATUS OBSOLETE__IOW(PP_IOCTL, 0x82, unsigned char)
26 /* Read/write control */
27 #define PPRCONTROL _IOR(PP_IOCTL, 0x83, unsigned char)
28 #define PPWCONTROL _IOW(PP_IOCTL, 0x84, unsigned char)
30 struct ppdev_frob_struct {
31 unsigned char mask;
32 unsigned char val;
34 #define PPFCONTROL _IOW(PP_IOCTL, 0x8e, struct ppdev_frob_struct)
36 /* Read/write data */
37 #define PPRDATA _IOR(PP_IOCTL, 0x85, unsigned char)
38 #define PPWDATA _IOW(PP_IOCTL, 0x86, unsigned char)
40 /* Read/write econtrol (not used) */
41 #define PPRECONTROL OBSOLETE__IOR(PP_IOCTL, 0x87, unsigned char)
42 #define PPWECONTROL OBSOLETE__IOW(PP_IOCTL, 0x88, unsigned char)
44 /* Read/write FIFO (not used) */
45 #define PPRFIFO OBSOLETE__IOR(PP_IOCTL, 0x89, unsigned char)
46 #define PPWFIFO OBSOLETE__IOW(PP_IOCTL, 0x8a, unsigned char)
48 /* Claim the port to start using it */
49 #define PPCLAIM _IO(PP_IOCTL, 0x8b)
51 /* Release the port when you aren't using it */
52 #define PPRELEASE _IO(PP_IOCTL, 0x8c)
54 /* Yield the port (release it if another driver is waiting,
55 * then reclaim) */
56 #define PPYIELD _IO(PP_IOCTL, 0x8d)
58 /* Register device exclusively (must be before PPCLAIM). */
59 #define PPEXCL _IO(PP_IOCTL, 0x8f)
61 /* Data line direction: non-zero for input mode. */
62 #define PPDATADIR _IOW(PP_IOCTL, 0x90, int)
64 /* Negotiate a particular IEEE 1284 mode. */
65 #define PPNEGOT _IOW(PP_IOCTL, 0x91, int)
67 /* Set control lines when an interrupt occurs. */
68 #define PPWCTLONIRQ _IOW(PP_IOCTL, 0x92, unsigned char)
70 /* Clear (and return) interrupt count. */
71 #define PPCLRIRQ _IOR(PP_IOCTL, 0x93, int)
73 /* Set the IEEE 1284 phase that we're in (e.g. IEEE1284_PH_FWD_IDLE) */
74 #define PPSETPHASE _IOW(PP_IOCTL, 0x94, int)
76 /* Set and get port timeout (struct timeval's) */
77 #define PPGETTIME _IOR(PP_IOCTL, 0x95, struct timeval)
78 #define PPSETTIME _IOW(PP_IOCTL, 0x96, struct timeval)
80 /* Get available modes (what the hardware can do) */
81 #define PPGETMODES _IOR(PP_IOCTL, 0x97, unsigned int)
83 /* Get the current mode and phaze */
84 #define PPGETMODE _IOR(PP_IOCTL, 0x98, int)
85 #define PPGETPHASE _IOR(PP_IOCTL, 0x99, int)
87 /* get/set flags */
88 #define PPGETFLAGS _IOR(PP_IOCTL, 0x9a, int)
89 #define PPSETFLAGS _IOW(PP_IOCTL, 0x9b, int)
91 /* flags visible to the world */
92 #define PP_FASTWRITE (1<<2)
93 #define PP_FASTREAD (1<<3)
94 #define PP_W91284PIC (1<<4)
96 /* only masks user-visible flags */
97 #define PP_FLAGMASK (PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC)