uart_set_options(9)
π uart_set_options(9) π
okay so this is a page from the Kernel API Manual (yes, the Kernel API Manual, we're fancy now) and it's all about uart_set_options β the little function that gets your serial console parameters set up. bestie, it's giving "backstage pass to the tty subsystem" and i'm obsessed. π
β¨ NAME β¨
uart_set_options β setup the serial console parameters π¦
πΈ SYNOPSIS πΈ
int uart_set_options (struct uart_port *port , struct console *co , int
baud , int parity , int bits , int flow );
like, yes, that's a whole lotta ints. it's fine. we get through it together. π
π ARGUMENTS π
portβ pointer to the serial port'suart_portstructure, aka the main character of this whole operation πcoβ the console pointer, no capbaudβ the baud rate βparityβ the parity character, and it's one of these three cuties:'n'(none),'o'(odd),'e'(even)bitsβ number of data bits πflowβ flow control character β'r'(rts)
π₯ DESCRIPTION π₯
Locking: the caller must hold console_list_lock in order to serialize early initialization of the serial-console lock. fr fr, this is not a suggestion, this is the assignment π hold the lock or don't come to the function. π
lowkey important: that locking rule is the entire description. don't skip it, bestie. π
π§ SEE ALSO π§
Kernel file ./drivers/tty/serial/serial_core.c β here's the whole friend group, all linked up π«Ά
uart_write_wakeup(9)uart_update_timeout(9)uart_get_baud_rate(9)uart_get_divisor(9)uart_get_lsr_info(9)uart_console_write(9)uart_parse_earlycon(9)uart_parse_options(9)uart_change_pm(9)uart_register_driver(9)uart_unregister_driver(9)serial_core_add_one_port(9)serial_core_remove_one_port(9)uart_match_port(9)uart_handle_dcd_change(9)uart_handle_cts_change(9)uart_insert_char(9)uart_try_toggle_sysrq(9)uart_get_rs485_mode(9)
and that's the page, bestie! this one lives in ./drivers/tty/serial and it's stamped October 2026 β so like, remember it fondly, and go hold that console_list_lock. slay. π
β¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms