serdev_device_write_buf(9)
π serdev_device_write_buf π
okay so bestie, welcome to the Kernel API Manual β yes you're literally reading kernel docs rn and I'm so proud of you π«Ά this one's about serdev_device_write_buf, no cap.
β¨ NAME β¨
serdev_device_write_buf β write data asynchronously, i.e. you hand off your bytes and do not sit around waiting for them, because you have main character energy and other things to do π
π¦ SYNOPSIS π¦
int serdev_device_write_buf (struct serdev_device *serdev , const u8
*buf , size_t count );
π ARGUMENTS π
serdevβ the serdev device, your little guy, the one you're writing to πbufβ the data to be written, aka your bytes, your content, your momentcountβ number of bytes to write. how many. the quantity. be honest about it
πΈ DESCRIPTION πΈ
Write data to the device asynchronously. You drop the bytes off and you leave. Iconic behaviour, honestly.
β οΈ lowkey important, bestie: any accepted data has only been buffered by the controller β like, it's in the building, but it is NOT out the door yet. So if you actually need to know the controller write buffer has been emptied for real, use serdev_device_wait_until_sent. Do not skip this step. This is the vibe check your data needs π
β RETURN β
The number of bytes written β which is less than count if there wasn't enough room in the write buffer (not a glow-up moment, but it happens) β or a negative errno on errors π
π₯ SEE ALSO π₯
Kernel file ./drivers/tty/serdev/core.c β go read it, iykyk π
serdev_device_add(9)serdev_device_remove(9)serdev_device_write(9)serdev_device_alloc(9)serdev_controller_alloc(9)of_find_serdev_controller_by_node(9)serdev_acpi_get_uart_resource(9)serdev_controller_add(9)serdev_controller_remove(9)__serdev_device_driver_register(9)
that's the whole page, bestie β go buffer some bytes responsibly π§
mwah π this has been the serdev_device_write_buf(9) page, living in ./drivers/tty/serdev, dated October 2026, brought to you by the Kernel API Manual. slay, bye π
π¦ 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