Lines Matching defs:bits
434 * CP210X_PURGE - 16 bits passed in wValue of USB request.
435 * SiLabs app note AN571 gives a strange description of the 4 bits:
1061 * Reads the baud rate, data bits, parity, stop bits and flow control mode
1092 u16 bits;
1103 cp210x_get_line_ctl(port, &bits);
1105 switch (bits & BITS_DATA_MASK) {
1107 dev_dbg(dev, "%s - data bits = 5\n", __func__);
1111 dev_dbg(dev, "%s - data bits = 6\n", __func__);
1115 dev_dbg(dev, "%s - data bits = 7\n", __func__);
1119 dev_dbg(dev, "%s - data bits = 8\n", __func__);
1123 dev_dbg(dev, "%s - data bits = 9 (not supported, using 8 data bits)\n", __func__);
1125 bits &= ~BITS_DATA_MASK;
1126 bits |= BITS_DATA_8;
1127 cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits);
1130 dev_dbg(dev, "%s - Unknown number of data bits, using 8\n", __func__);
1132 bits &= ~BITS_DATA_MASK;
1133 bits |= BITS_DATA_8;
1134 cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits);
1138 switch (bits & BITS_PARITY_MASK) {
1164 bits &= ~BITS_PARITY_MASK;
1165 cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits);
1170 switch (bits & BITS_STOP_MASK) {
1172 dev_dbg(dev, "%s - stop bits = 1\n", __func__);
1175 dev_dbg(dev, "%s - stop bits = 1.5 (not supported, using 1 stop bit)\n", __func__);
1176 bits &= ~BITS_STOP_MASK;
1177 cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits);
1180 dev_dbg(dev, "%s - stop bits = 2\n", __func__);
1184 dev_dbg(dev, "%s - Unknown number of stop bits, using 1 stop bit\n", __func__);
1185 bits &= ~BITS_STOP_MASK;
1186 cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits);
1388 u16 bits;
1396 /* If the number of data bits is to be updated */
1398 cp210x_get_line_ctl(port, &bits);
1399 bits &= ~BITS_DATA_MASK;
1402 bits |= BITS_DATA_5;
1403 dev_dbg(dev, "%s - data bits = 5\n", __func__);
1406 bits |= BITS_DATA_6;
1407 dev_dbg(dev, "%s - data bits = 6\n", __func__);
1410 bits |= BITS_DATA_7;
1411 dev_dbg(dev, "%s - data bits = 7\n", __func__);
1415 bits |= BITS_DATA_8;
1416 dev_dbg(dev, "%s - data bits = 8\n", __func__);
1419 if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
1420 dev_dbg(dev, "Number of data bits requested not supported by device\n");
1425 cp210x_get_line_ctl(port, &bits);
1426 bits &= ~BITS_PARITY_MASK;
1430 bits |= BITS_PARITY_MARK;
1433 bits |= BITS_PARITY_SPACE;
1438 bits |= BITS_PARITY_ODD;
1441 bits |= BITS_PARITY_EVEN;
1446 if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
1451 cp210x_get_line_ctl(port, &bits);
1452 bits &= ~BITS_STOP_MASK;
1454 bits |= BITS_STOP_2;
1455 dev_dbg(dev, "%s - stop bits = 2\n", __func__);
1457 bits |= BITS_STOP_1;
1458 dev_dbg(dev, "%s - stop bits = 1\n", __func__);
1460 if (cp210x_write_u16_reg(port, CP210X_SET_LINE_CTL, bits))
1461 dev_dbg(dev, "Number of stop bits requested not supported by device\n");
1929 * the low three bits of the mode/latch fields.
1930 * Contrary to the document linked above, the bits for