cros_ec_pd_command(9)
β¨ cros_ec_pd_command(9) β¨
okay so bestie, this is a page from the Kernel API Manual and it's lowkey one of those tiny-but-mighty functions you'll be glad you bookmarked. it's cros_ec_pd_command β the girl whose whole job is sending a command to the EC. that's it, that's the vibe. π
π NAME π
cros_ec_pd_command β send a command to the EC.
like, literally. she delivers your message to the embedded controller. main character energy, zero drama. π
πΈ SYNOPSIS πΈ
int cros_ec_pd_command (struct cros_ec_extcon_info *info , unsigned int
command , unsigned int version , void *outdata , unsigned int outsize ,
void *indata , unsigned int insize );
that signature is kinda long ngl, but she's worth it π«Ά
π¦ ARGUMENTS π¦
infoβ pointer tostruct cros_ec_extcon_info. this is the β¨contextβ¨ she's working with, so don't be out here passing nonsense.commandβ the EC command. the actual thing you're asking for, iykyk.versionβ the EC command version. yes, she's versioned, she's professional.outdataβ EC command output data. this is where the goodies land πoutsizeβ size ofoutdata. tell her how big the landing pad is, bestie.indataβ EC command input data. what you're feeding her πinsizeβ size ofindata. same deal, but for the input side.
no cap:outdata/outsizeandindata/insizeare a matched set β one without the other is giving chaos. π
π₯ RETURN π₯
0on success π<0on failure π
that's it. clean, simple, iconic. periodt.
π SEE ALSO π
- Kernel file
./drivers/extcon/extcon-usbc-cros-ec.cβ the source, go read her β¨ cros_ec_usb_get_power_type(9)cros_ec_usb_get_pd_mux_state(9)cros_ec_usb_get_role(9)cros_ec_pd_get_num_ports(9)
go stan the whole friend group, fr fr π
and that's the whole page bestie!! π§ this little love letter lives in ./drivers/extcon and it's dated October 2026, so likeβ¦ future-era documentation. you're so welcome. 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