1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify 3*4882a593Smuzhiyun * it under the terms of the GNU General Public License as published by 4*4882a593Smuzhiyun * the Free Software Foundation; either version 2 of the License, or 5*4882a593Smuzhiyun * (at your option) any later version. 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 8*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 9*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10*4882a593Smuzhiyun * GNU General Public License for more details. 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * You should have received a copy of the GNU General Public License 13*4882a593Smuzhiyun * along with this program; if not, write to the Free Software 14*4882a593Smuzhiyun * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15*4882a593Smuzhiyun */ 16*4882a593Smuzhiyun 17*4882a593Smuzhiyun #include <linux/ioctl.h> 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #define XR_USB_SERIAL_IOC_MAGIC 'v' 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun #define XR_USB_SERIAL_GET_REG _IOWR(XR_USB_SERIAL_IOC_MAGIC, 1, int) 22*4882a593Smuzhiyun #define XR_USB_SERIAL_SET_REG _IOWR(XR_USB_SERIAL_IOC_MAGIC, 2, int) 23*4882a593Smuzhiyun #define XR_USB_SERIAL_SET_ADDRESS_MATCH _IO(XR_USB_SERIAL_IOC_MAGIC, 3) 24*4882a593Smuzhiyun #define XR_USB_SERIAL_SET_PRECISE_FLAGS _IO(XR_USB_SERIAL_IOC_MAGIC, 4) 25*4882a593Smuzhiyun #define XR_USB_SERIAL_TEST_MODE _IO(XR_USB_SERIAL_IOC_MAGIC, 5) 26*4882a593Smuzhiyun #define XR_USB_SERIAL_LOOPBACK _IO(XR_USB_SERIAL_IOC_MAGIC, 6) 27*4882a593Smuzhiyun #define XR_USB_SERIAL_SET_GPIO_MODE_REG _IO(XR_USB_SERIAL_IOC_MAGIC, 9) 28*4882a593Smuzhiyun #define XR_USB_SERIAL_GET_GPIO_MODE_REG _IO(XR_USB_SERIAL_IOC_MAGIC, 10) 29*4882a593Smuzhiyun #define XRIOC_SET_ANY_BAUD_RATE _IO(XR_USB_SERIAL_IOC_MAGIC, 11) 30*4882a593Smuzhiyun #define XRIOC_SET_PRECISE_FLAGS _IO(XR_USB_SERIAL_IOC_MAGIC, 12) 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #define VZ_ADDRESS_UNICAST_S 0 33*4882a593Smuzhiyun #define VZ_ADDRESS_BROADCAST_S 8 34*4882a593Smuzhiyun #define VZ_ADDRESS_MATCH(U, B) (0x8000000 | ((B) << VZ_ADDRESS_BROADCAST_S) | ((U) << VZ_ADDRESS_UNICAST_S)) 35*4882a593Smuzhiyun #define VZ_ADDRESS_MATCH_DISABLE 0 36