~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/usb/irda.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * USB IrDA Bridge Device Definition
  4  */
  5 
  6 #ifndef __LINUX_USB_IRDA_H
  7 #define __LINUX_USB_IRDA_H
  8 
  9 /* This device should use Application-specific class */
 10 
 11 #define USB_SUBCLASS_IRDA                       0x02
 12 
 13 /*-------------------------------------------------------------------------*/
 14 
 15 /* Class-Specific requests (bRequest field) */
 16 
 17 #define USB_REQ_CS_IRDA_RECEIVING               1
 18 #define USB_REQ_CS_IRDA_CHECK_MEDIA_BUSY        3
 19 #define USB_REQ_CS_IRDA_RATE_SNIFF              4
 20 #define USB_REQ_CS_IRDA_UNICAST_LIST            5
 21 #define USB_REQ_CS_IRDA_GET_CLASS_DESC          6
 22 
 23 /*-------------------------------------------------------------------------*/
 24 
 25 /* Class-Specific descriptor */
 26 
 27 #define USB_DT_CS_IRDA                          0x21
 28 
 29 /*-------------------------------------------------------------------------*/
 30 
 31 /* Data sizes */
 32 
 33 #define USB_IRDA_DS_2048                        (1 << 5)
 34 #define USB_IRDA_DS_1024                        (1 << 4)
 35 #define USB_IRDA_DS_512                         (1 << 3)
 36 #define USB_IRDA_DS_256                         (1 << 2)
 37 #define USB_IRDA_DS_128                         (1 << 1)
 38 #define USB_IRDA_DS_64                          (1 << 0)
 39 
 40 /* Window sizes */
 41 
 42 #define USB_IRDA_WS_7                           (1 << 6)
 43 #define USB_IRDA_WS_6                           (1 << 5)
 44 #define USB_IRDA_WS_5                           (1 << 4)
 45 #define USB_IRDA_WS_4                           (1 << 3)
 46 #define USB_IRDA_WS_3                           (1 << 2)
 47 #define USB_IRDA_WS_2                           (1 << 1)
 48 #define USB_IRDA_WS_1                           (1 << 0)
 49 
 50 /* Min turnaround times in usecs */
 51 
 52 #define USB_IRDA_MTT_0                          (1 << 7)
 53 #define USB_IRDA_MTT_10                         (1 << 6)
 54 #define USB_IRDA_MTT_50                         (1 << 5)
 55 #define USB_IRDA_MTT_100                        (1 << 4)
 56 #define USB_IRDA_MTT_500                        (1 << 3)
 57 #define USB_IRDA_MTT_1000                       (1 << 2)
 58 #define USB_IRDA_MTT_5000                       (1 << 1)
 59 #define USB_IRDA_MTT_10000                      (1 << 0)
 60 
 61 /* Baud rates */
 62 
 63 #define USB_IRDA_BR_4000000                     (1 << 8)
 64 #define USB_IRDA_BR_1152000                     (1 << 7)
 65 #define USB_IRDA_BR_576000                      (1 << 6)
 66 #define USB_IRDA_BR_115200                      (1 << 5)
 67 #define USB_IRDA_BR_57600                       (1 << 4)
 68 #define USB_IRDA_BR_38400                       (1 << 3)
 69 #define USB_IRDA_BR_19200                       (1 << 2)
 70 #define USB_IRDA_BR_9600                        (1 << 1)
 71 #define USB_IRDA_BR_2400                        (1 << 0)
 72 
 73 /* Additional BOFs */
 74 
 75 #define USB_IRDA_AB_0                           (1 << 7)
 76 #define USB_IRDA_AB_1                           (1 << 6)
 77 #define USB_IRDA_AB_2                           (1 << 5)
 78 #define USB_IRDA_AB_3                           (1 << 4)
 79 #define USB_IRDA_AB_6                           (1 << 3)
 80 #define USB_IRDA_AB_12                          (1 << 2)
 81 #define USB_IRDA_AB_24                          (1 << 1)
 82 #define USB_IRDA_AB_48                          (1 << 0)
 83 
 84 /* IRDA Rate Sniff */
 85 
 86 #define USB_IRDA_RATE_SNIFF                     1
 87 
 88 /*-------------------------------------------------------------------------*/
 89 
 90 struct usb_irda_cs_descriptor {
 91         __u8    bLength;
 92         __u8    bDescriptorType;
 93 
 94         __le16  bcdSpecRevision;
 95         __u8    bmDataSize;
 96         __u8    bmWindowSize;
 97         __u8    bmMinTurnaroundTime;
 98         __le16  wBaudRate;
 99         __u8    bmAdditionalBOFs;
100         __u8    bIrdaRateSniff;
101         __u8    bMaxUnicastList;
102 } __attribute__ ((packed));
103 
104 /*-------------------------------------------------------------------------*/
105 
106 /* Data Format */
107 
108 #define USB_IRDA_STATUS_MEDIA_BUSY      (1 << 7)
109 
110 /* The following is a 4-bit value used for both
111  * inbound and outbound headers:
112  *
113  * 0 - speed ignored
114  * 1 - 2400 bps
115  * 2 - 9600 bps
116  * 3 - 19200 bps
117  * 4 - 38400 bps
118  * 5 - 57600 bps
119  * 6 - 115200 bps
120  * 7 - 576000 bps
121  * 8 - 1.152 Mbps
122  * 9 - 4 Mbps
123  * 10..15 - Reserved
124  */
125 #define USB_IRDA_STATUS_LINK_SPEED      0x0f
126 
127 #define USB_IRDA_LS_NO_CHANGE           0
128 #define USB_IRDA_LS_2400                1
129 #define USB_IRDA_LS_9600                2
130 #define USB_IRDA_LS_19200               3
131 #define USB_IRDA_LS_38400               4
132 #define USB_IRDA_LS_57600               5
133 #define USB_IRDA_LS_115200              6
134 #define USB_IRDA_LS_576000              7
135 #define USB_IRDA_LS_1152000             8
136 #define USB_IRDA_LS_4000000             9
137 
138 /* The following is a 4-bit value used only for
139  * outbound header:
140  *
141  * 0 - No change (BOF ignored)
142  * 1 - 48 BOFs
143  * 2 - 24 BOFs
144  * 3 - 12 BOFs
145  * 4 - 6 BOFs
146  * 5 - 3 BOFs
147  * 6 - 2 BOFs
148  * 7 - 1 BOFs
149  * 8 - 0 BOFs
150  * 9..15 - Reserved
151  */
152 #define USB_IRDA_EXTRA_BOFS             0xf0
153 
154 struct usb_irda_inbound_header {
155         __u8            bmStatus;
156 };
157 
158 struct usb_irda_outbound_header {
159         __u8            bmChange;
160 };
161 
162 #endif /* __LINUX_USB_IRDA_H */
163 
164 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php