hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/drivers/usb/serial/ftdi_sio.h
....@@ -35,7 +35,10 @@
3535 #define FTDI_SIO_SET_EVENT_CHAR 6 /* Set the event character */
3636 #define FTDI_SIO_SET_ERROR_CHAR 7 /* Set the error character */
3737 #define FTDI_SIO_SET_LATENCY_TIMER 9 /* Set the latency timer */
38
-#define FTDI_SIO_GET_LATENCY_TIMER 10 /* Get the latency timer */
38
+#define FTDI_SIO_GET_LATENCY_TIMER 0x0a /* Get the latency timer */
39
+#define FTDI_SIO_SET_BITMODE 0x0b /* Set bitbang mode */
40
+#define FTDI_SIO_READ_PINS 0x0c /* Read immediate value of pins */
41
+#define FTDI_SIO_READ_EEPROM 0x90 /* Read EEPROM */
3942
4043 /* Interface indices for FT2232, FT2232H and FT4232H devices */
4144 #define INTERFACE_A 1
....@@ -299,7 +302,7 @@
299302 /*
300303 * FTDI_SIO_GET_LATENCY_TIMER
301304 *
302
- * Set the timeout interval. The FTDI collects data from the slave
305
+ * Set the timeout interval. The FTDI collects data from the
303306 * device, transmitting it to the host when either A) 62 bytes are
304307 * received, or B) the timeout interval has elapsed and the buffer
305308 * contains at least 1 byte. Setting this value to a small number
....@@ -321,7 +324,7 @@
321324 /*
322325 * FTDI_SIO_SET_LATENCY_TIMER
323326 *
324
- * Set the timeout interval. The FTDI collects data from the slave
327
+ * Set the timeout interval. The FTDI collects data from the
325328 * device, transmitting it to the host when either A) 62 bytes are
326329 * received, or B) the timeout interval has elapsed and the buffer
327330 * contains at least 1 byte. Setting this value to a small number
....@@ -433,6 +436,29 @@
433436 * 1 = active
434437 */
435438
439
+/* FTDI_SIO_SET_BITMODE */
440
+#define FTDI_SIO_SET_BITMODE_REQUEST_TYPE 0x40
441
+#define FTDI_SIO_SET_BITMODE_REQUEST FTDI_SIO_SET_BITMODE
442
+
443
+/* Possible bitmodes for FTDI_SIO_SET_BITMODE_REQUEST */
444
+#define FTDI_SIO_BITMODE_RESET 0x00
445
+#define FTDI_SIO_BITMODE_CBUS 0x20
446
+
447
+/* FTDI_SIO_READ_PINS */
448
+#define FTDI_SIO_READ_PINS_REQUEST_TYPE 0xc0
449
+#define FTDI_SIO_READ_PINS_REQUEST FTDI_SIO_READ_PINS
450
+
451
+/*
452
+ * FTDI_SIO_READ_EEPROM
453
+ *
454
+ * EEPROM format found in FTDI AN_201, "FT-X MTP memory Configuration",
455
+ * http://www.ftdichip.com/Support/Documents/AppNotes/AN_201_FT-X%20MTP%20Memory%20Configuration.pdf
456
+ */
457
+#define FTDI_SIO_READ_EEPROM_REQUEST_TYPE 0xc0
458
+#define FTDI_SIO_READ_EEPROM_REQUEST FTDI_SIO_READ_EEPROM
459
+
460
+#define FTDI_FTX_CBUS_MUX_GPIO 0x8
461
+#define FTDI_FT232R_CBUS_MUX_GPIO 0xa
436462
437463
438464 /* Descriptors returned by the device