cvs_hw_init(9)
π cvs_hw_init(9) β like, the Kernel API Manual page, bestie β¨
Ok so real talk, this is cvs_hw_init from section 9 of the Kernel API Manual, and she's the little "hello?? are you actually a prefix device??" moment of the whole driver π«Ά
π NAME π
cvs_hw_init β probe the device for prefix support and then apply the matching quirks π
β¨ SYNOPSIS β¨
int cvs_hw_init (struct icvs *ctx );
πΈ ARGUMENTS πΈ
ctxβ the CVS device context, the main character we're doing all this for π
π¦ DESCRIPTION π¦
So first thing: it sends GET_DEV_VID_PID and basically does a vibe check looking for a 32-bit prefix π
If it matches ICVS_PREFIX_VAL, it sets ctx->prefix and that's what gets used for all the reads that come after β slay, the vibe is confirmed π
Then it reads the VID/PID and applies whatever quirks match. Because of course there are quirks. There are always quirks π
And good news: GET_DEV_VID_PID is supported by all protocol versions, no cap, so you're not gonna hit a version that's like "new phone who dis" π
β RETURN β
0 on success, or a negative errno if it's giving "that didn't work" energy π
π SEE ALSO π
- Kernel file
./drivers/media/i2c/cvs/core.cβ that's the home base, iykyk π 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_irq_handler(9)cvs_reset(9)cvs_recv(9)cvs_send(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)
That's the whole page, no notes π It lives at ./drivers/media/i2c/cvs, it's dated October 2026, and this is the cvs_hw_init(9) entry β periodt, go read the other ones too πβ¨π¦
π¦ 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