usb_of_get_companion_dev(9)
β¨ NAME β¨
okay so this is the usb_of_get_companion_dev(9) page from the Kernel API Manual, and it's literally here to help you find the companion device π
πΈ SYNOPSIS πΈ
struct device * usb_of_get_companion_dev (struct device *dev );
π ARGUMENTS π
devβ the device pointer you're using to go find a companion. It's the starting point, bestie π«Ά
π¦ DESCRIPTION π¦
This function finds the companion device from the platform bus. slay.
It takes a reference to the returned struct device, and that reference needs to be dropped after use. So likeβ¦ don't forget to clean up after yourself, okay? π
β RETURN β
On success, you get a pointer to the companion device. On failure, you get NULL. That's the whole vibe check π
π₯ SEE ALSO π₯
Kernel file ./drivers/usb/common/common.c plus these little icons:
usb_ep_type_string(9)usb_otg_state_string(9)usb_speed_string(9)usb_get_maximum_speed(9)usb_get_maximum_ssp_rate(9)usb_state_string(9)usb_get_dr_mode_from_string(9)usb_get_role_switch_default_mode(9)usb_decode_interval(9)of_usb_get_dr_mode_by_phy(9)of_usb_host_tpl_support(9)of_usb_update_otg_caps(9)
mwah π this page lives in ./drivers/usb/common, dated October 2026, and it's the usb_of_get_companion_dev(9) manual β bye bestie, go drop that reference ππ«Ά
π¦ 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