• Home
  • Raw
  • Download

Lines Matching refs:baud

1068 	unsigned int baud;  in cp210x_get_termios()  local
1072 &tty->termios.c_cflag, &baud); in cp210x_get_termios()
1073 tty_encode_baud_rate(tty, baud, baud); in cp210x_get_termios()
1077 cp210x_get_termios_port(port, &cflag, &baud); in cp210x_get_termios()
1091 u32 baud; in cp210x_get_termios_port() local
1096 cp210x_read_u32_reg(port, CP210X_GET_BAUDRATE, &baud); in cp210x_get_termios_port()
1098 dev_dbg(dev, "%s - baud rate = %d\n", __func__, baud); in cp210x_get_termios_port()
1099 *baudp = baud; in cp210x_get_termios_port()
1260 static speed_t cp210x_get_an205_rate(speed_t baud) in cp210x_get_an205_rate() argument
1265 if (baud <= cp210x_an205_table1[i].high) in cp210x_get_an205_rate()
1272 static speed_t cp210x_get_actual_rate(speed_t baud) in cp210x_get_actual_rate() argument
1277 if (baud <= 365) in cp210x_get_actual_rate()
1280 div = DIV_ROUND_CLOSEST(48000000, 2 * prescale * baud); in cp210x_get_actual_rate()
1281 baud = 48000000 / (2 * prescale * div); in cp210x_get_actual_rate()
1283 return baud; in cp210x_get_actual_rate()
1317 u32 baud; in cp210x_change_speed() local
1325 baud = clamp(tty->termios.c_ospeed, priv->min_speed, priv->max_speed); in cp210x_change_speed()
1328 baud = cp210x_get_actual_rate(baud); in cp210x_change_speed()
1329 else if (baud < 1000000) in cp210x_change_speed()
1330 baud = cp210x_get_an205_rate(baud); in cp210x_change_speed()
1332 dev_dbg(&port->dev, "%s - setting baud rate to %u\n", __func__, baud); in cp210x_change_speed()
1333 if (cp210x_write_u32_reg(port, CP210X_SET_BAUDRATE, baud)) { in cp210x_change_speed()
1334 dev_warn(&port->dev, "failed to set baud rate to %u\n", baud); in cp210x_change_speed()
1336 baud = old_termios->c_ospeed; in cp210x_change_speed()
1338 baud = 9600; in cp210x_change_speed()
1341 tty_encode_baud_rate(tty, baud, baud); in cp210x_change_speed()