cvs_send(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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) with cmd_id and param already 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_CONFIG
  • ICVS_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 πŸ’€

  • 0 on success πŸŽ‰
  • negative errno on failure
  • -EINVAL for an unsupported command, or for a status coming from the device in ctx->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