STRUCT CDNS_UART(9)
π struct cdns_uart β device data, bestie
okay so this is the kernel API manual page for struct cdns_uart, and it's literally just the vibe of a UART device's whole personality stored in one struct. no cap. it's giving "everything you need to know about this device, in a C struct" β¨
β¨ NAME β¨
struct cdns_uart β device data π
like⦠it's the device data. the whole thing. that's the assignment and it ate.
πΈ SYNOPSIS πΈ
struct cdns_uart {
struct uart_port *port;
struct clk *uartclk;
struct clk *pclk;
unsigned int baud;
struct notifier_block clk_rate_change_nb;
u32 quirks;
bool cts_override;
struct gpio_desc *gpiod_rts;
bool rs485_tx_started;
struct hrtimer tx_timer;
struct reset_control *rstc;
};
copy it exactly, character for character, please and thank you π«Ά this is not the place to freestyle.
π¦ Members π¦
okay bestie, field-by-field tour, let's go π
portβ pointer to the UART port. iconic. the main character of the struct fr fr.uartclkβ the reference clock. the clock the whole thing looks up to πpclkβ the APB clock. second clock, equally valid, we stan both βbaudβ the current baud rate. it's anunsigned int, it's the number, it's the speed, periodt.clk_rate_change_nbβ notifier block for clock changes. it's literally the "hey bestie, the clock changed" messenger π₯quirksβ flags for RXBS support. yes it's spelled "quirks". no we're not changing it. it's quirky like that πcts_overrideβ modem control state override. abool. it overrides. that's the whole job.gpiod_rtsβ pointer to the gpio descriptor. a wholestruct gpio_desc *, living its best life πrs485_tx_startedβ RS485 tx state. also abool, also keeping track of whether tx has started, as one does.tx_timerβ timer for tx. astruct hrtimer, because tx needs its own little clock moment β°rstcβ pointer to the reset control. holding the reset destiny of the whole device π
no field left behind. every single one is on the list. we don't skip members in this house π§
π SEE ALSO π
the kernel file is ./drivers/tty/serial/xilinx_uartps.c β remember that, it's the home base π
and now, the entire friend group, in order, no one gets cut from the group chat:
cdns_uart_handle_rx(9)cdns_rts_gpio_enable(9)cdns_rs485_tx_setup(9)cdns_rs485_rx_setup(9)cdns_uart_tx_empty(9)cdns_rs485_rx_callback(9)cdns_calc_after_tx_delay(9)cdns_uart_handle_tx(9)cdns_uart_isr(9)cdns_uart_calc_baud_divs(9)cdns_uart_set_baud_rate(9)cdns_uart_clk_notifier_cb(9)cdns_rs485_tx_callback(9)cdns_uart_start_tx(9)cdns_uart_stop_tx(9)cdns_uart_stop_rx(9)cdns_uart_break_ctl(9)cdns_uart_set_termios(9)cdns_uart_startup(9)cdns_uart_shutdown(9)cdns_uart_type(9)cdns_uart_verify_port(9)cdns_uart_request_port(9)cdns_uart_release_port(9)cdns_uart_config_port(9)cdns_uart_get_mctrl(9)cdns_uart_console_putchar(9)cdns_uart_console_write(9)cdns_uart_console_setup(9)cdns_uart_suspend(9)cdns_uart_resume(9)cdns_rs485_config(9)cdns_uart_probe(9)cdns_uart_remove(9)
thirty-four references, all accounted for, and honestly? reading them all is the vibe check you need before touching this driver πβ¨
lowkey important: this page is part of the Kernel API Manual, from the./drivers/tty/serialsection, dated October 2026, and it's titledstruct cdns_uart(9). that's the lore. π
anyway bestie that's the whole page β device data, every member named, every function referenced, nothing dropped. slay, go read the source, mwah ππ
π¦ 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