tb_lc_is_usb_plugged(9)
β¨ tb_lc_is_usb_plugged π
okay so this is a kernel API manual page, bestie β the function is literally called tb_lc_is_usb_plugged and it lives in section 9 of the manual (that's the kernel API section, iykyk). It's giving "quick little yes-or-no question" energy, and honestly? we love a function that just tells you the truth. π«Ά
πΈ NAME πΈ
tb_lc_is_usb_plugged β is there a USB device connected to this port or not? That's it. That's the whole gig. π
π SYNOPSIS π
bool tb_lc_is_usb_plugged (struct tb_port *port );
it returns a bool, it takes one argument, it does not have time for drama. slay. β¨
π¦ ARGUMENTS π¦
portβ the device router lane 0 adapter. that's the thing you're asking about. like pointing at a door and being like "is somebody in there?" πͺπ
β RETURN β
trueβ yesss, the port has a USB Type-C device connected to it. plugged in. connected. living its best life. ππfalseβ nope, nothing hooked up to that port. empty. quiet. no device, no vibes. π
π SEE ALSO π
okay so there is a LOT of sibling energy in this family, and the kernel file is literally ./drivers/thunderbolt/lc.c β here's everyone in the group chat:
tb_lc_read_uuid(9)tb_lc_reset_port(9)tb_lc_configure_port(9)tb_lc_unconfigure_port(9)tb_lc_configure_xdomain(9)tb_lc_unconfigure_xdomain(9)tb_lc_start_lane_initialization(9)tb_lc_is_clx_supported(9)tb_lc_is_xhci_connected(9)tb_lc_xhci_connect(9)tb_lc_xhci_disconnect(9)tb_lc_set_wake(9)tb_lc_set_sleep(9)tb_lc_lane_bonding_possible(9)tb_lc_dp_sink_query(9)tb_lc_dp_sink_alloc(9)tb_lc_dp_sink_dealloc(9)tb_lc_force_power(9)
like, that's the whole friend group. go say hi. π§ββοΈ
ngl if you were looking for a long, complicated function β this is not her. she's one question, one answer, done. and that's iconic. π
mwah π β this page is brought to you by the source tree ./drivers/thunderbolt, dated October 2026, and it's been tb_lc_is_usb_plugged(9) the entire time. periodt. π
π¦ 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