xref: /OK3568_Linux_fs/kernel/include/uapi/linux/usb/g_printer.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * g_printer.h -- Header file for USB Printer gadget driver
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2007 Craig W. Nadler
6*4882a593Smuzhiyun  *
7*4882a593Smuzhiyun  * This program is free software; you can redistribute it and/or modify
8*4882a593Smuzhiyun  * it under the terms of the GNU General Public License as published by
9*4882a593Smuzhiyun  * the Free Software Foundation; either version 2 of the License, or
10*4882a593Smuzhiyun  * (at your option) any later version.
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * This program is distributed in the hope that it will be useful,
13*4882a593Smuzhiyun  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14*4882a593Smuzhiyun  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*4882a593Smuzhiyun  * GNU General Public License for more details.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  * You should have received a copy of the GNU General Public License
18*4882a593Smuzhiyun  * along with this program; if not, write to the Free Software
19*4882a593Smuzhiyun  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20*4882a593Smuzhiyun  */
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun #ifndef __LINUX_USB_G_PRINTER_H
23*4882a593Smuzhiyun #define __LINUX_USB_G_PRINTER_H
24*4882a593Smuzhiyun 
25*4882a593Smuzhiyun #define PRINTER_NOT_ERROR	0x08
26*4882a593Smuzhiyun #define PRINTER_SELECTED	0x10
27*4882a593Smuzhiyun #define PRINTER_PAPER_EMPTY	0x20
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun /* The 'g' code is also used by gadgetfs ioctl requests.
30*4882a593Smuzhiyun  * Don't add any colliding codes to either driver, and keep
31*4882a593Smuzhiyun  * them in unique ranges (size 0x20 for now).
32*4882a593Smuzhiyun  */
33*4882a593Smuzhiyun #define GADGET_GET_PRINTER_STATUS	_IOR('g', 0x21, unsigned char)
34*4882a593Smuzhiyun #define GADGET_SET_PRINTER_STATUS	_IOWR('g', 0x22, unsigned char)
35*4882a593Smuzhiyun 
36*4882a593Smuzhiyun #endif /* __LINUX_USB_G_PRINTER_H */
37