Linux 4.16.11
[linux/fpc-iii.git] / drivers / usb / serial / kl5kusb105.h
blob41c9bf60fbf0ccde62f5e3ebc4825e1d43c598d5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Definitions for the KLSI KL5KUSB105 serial port adapter
4 */
6 /* vendor/product pairs that are known to contain this chipset */
7 #define PALMCONNECT_VID 0x0830
8 #define PALMCONNECT_PID 0x0080
10 #define KLSI_VID 0x05e9
11 #define KLSI_KL5KUSB105D_PID 0x00c0
13 /* Vendor commands: */
16 /* port table -- the chip supports up to 4 channels */
18 /* baud rates */
20 enum {
21 kl5kusb105a_sio_b115200 = 0,
22 kl5kusb105a_sio_b57600 = 1,
23 kl5kusb105a_sio_b38400 = 2,
24 kl5kusb105a_sio_b19200 = 4,
25 kl5kusb105a_sio_b14400 = 5,
26 kl5kusb105a_sio_b9600 = 6,
27 kl5kusb105a_sio_b4800 = 8, /* unchecked */
28 kl5kusb105a_sio_b2400 = 9, /* unchecked */
29 kl5kusb105a_sio_b1200 = 0xa, /* unchecked */
30 kl5kusb105a_sio_b600 = 0xb /* unchecked */
33 /* data bits */
34 #define kl5kusb105a_dtb_7 7
35 #define kl5kusb105a_dtb_8 8
39 /* requests: */
40 #define KL5KUSB105A_SIO_SET_DATA 1
41 #define KL5KUSB105A_SIO_POLL 2
42 #define KL5KUSB105A_SIO_CONFIGURE 3
43 /* values used for request KL5KUSB105A_SIO_CONFIGURE */
44 #define KL5KUSB105A_SIO_CONFIGURE_READ_ON 3
45 #define KL5KUSB105A_SIO_CONFIGURE_READ_OFF 2
47 /* Interpretation of modem status lines */
48 /* These need sorting out by individually connecting pins and checking
49 * results. FIXME!
50 * When data is being sent we see 0x30 in the lower byte; this must
51 * contain DSR and CTS ...
53 #define KL5KUSB105A_DSR ((1<<4) | (1<<5))
54 #define KL5KUSB105A_CTS ((1<<5) | (1<<4))
56 #define KL5KUSB105A_WANTS_TO_SEND 0x30
57 #if 0
58 #define KL5KUSB105A_DTR /* Data Terminal Ready */
59 #define KL5KUSB105A_CTS /* Clear To Send */
60 #define KL5KUSB105A_CD /* Carrier Detect */
61 #define KL5KUSB105A_DSR /* Data Set Ready */
62 #define KL5KUSB105A_RxD /* Receive pin */
64 #define KL5KUSB105A_LE
65 #define KL5KUSB105A_RTS
66 #define KL5KUSB105A_ST
67 #define KL5KUSB105A_SR
68 #define KL5KUSB105A_RI /* Ring Indicator */
69 #endif