cvs_send(9)
π cvs_send(9) β the Kernel API Manual, but make it a group chat
okay bestie, hi, welcome to cvs_send(9) from the Kernel API Manual β literally the "common command submission path", aka the one function that takes your little command buffer and actually sends it out into the world. no cap, she's the main character of this file. π
β¨ SYNOPSIS β¨
int cvs_send (struct icvs *ctx , struct icvs_cmd *cmd , size_t len );
that's it. three args, one int coming back. slay. π«Ά
πΈ ARGUMENTS πΈ
ctxβ the CVS device context. your whole vibe/handle, basically.cmdβ the command buffer (icvs_cmd) withcmd_idandparamalready populated. like, you gotta fill those in yourself, she's not doing it for you πlenβ buffer length. the size. yes it matters.
π₯ DESCRIPTION π₯
so basically cvs_send dispatches a set of supported commands, and here's the lineup π€:
ICVS_SET_DEV_HOST_ID,ICVS_HOST_SENSOR_OWNER,ICVS_HOST_SET_MIPI_CONFIGICVS_FW_LOADER_*
(yes, that's exactly how the list is written, don't come for me)
for the I2C based commands, she sets big-endian cmd ids, writes to the device, and then waits for completion or timeout β via delayed work, no busy-looping. iconique. β
GPIO based ownership toggles are handled locally, right there on the spot. π¦
β οΈ okay this part is important β the caller must hold ctx->lock when invoking this function, and must check for i2c bus availability. this is not a suggest-and-forget situation, it's giving "read the room before you call". do it. π
π RETURN π
0on success π- negative errno on failure
-EINVALfor an unsupported command, or for a status coming from the device inctx->wq_resp
π SEE ALSO π
the whole extended universe, fr fr β kernel file ./drivers/media/i2c/cvs/core.c, plus:
cvs_set_quirks(9), cvs_read_i2c(9), cvs_write_i2c(9), cvs_checksum(9), cvs_schedule_and_wait(9), cvs_wait_wake_or_sleep(9), cvs_config_mipi(9), cvs_get_device_state(9), cvs_get_device_caps(9), cvs_hw_init(9), cvs_irq_handler(9), cvs_reset(9), cvs_recv(9), cvs_set_link_owner(9), cvs_configure_dev_caps(9), cvs_core_probe(9), cvs_probe(9), cvs_core_remove(9), cvs_remove(9), cvs_suspend(9), cvs_resume(9), cvs_runtime_resume(9), cvs_runtime_suspend(9), cvs_init(9), cvs_exit(9)
like that's the whole friend group, go say hi. π§
and that's the page!! πβ¨ this lil masterpiece lives in ./drivers/media/i2c/cvs, dated October 2026 (yes she's from the future, we stan a time traveler π°οΈπ), and it's filed under cvs_send(9) forever and ever. byeee bestie, go hold that lock π
π«Ά
π¦ 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