xiic_setclk(9)
π NAME π
okay so bestie, welcome to xiic_setclk(9) from the Kernel API Manual β¨ this one is literally called xiic_setclk β and it sets the configured clock rate. slay π
β¨ SYNOPSIS β¨
int xiic_setclk (struct xiic_i2c *i2c );
π ARGUMENTS π
i2cβ Pointer to thexiicdevice structure. iconic pointer behavior, no notes π
π¦ DESCRIPTION π¦
okay so the timing register values are calculated according to the input clock frequency and the configured scl frequency. for the full details, please refer the AXI I2C PG and NXP I2C Spec πβ¨
the supported frequencies are 100KHz, 400KHz and 1MHz. periodt π
πΈ RETURN πΈ
0on success (Supported frequency selected or not configurable in SW) π«Ά-EINVALon failure (sclfrequency not supported orTHIGHis 0) π
lowkey important: that-EINVALcase is the vibe check failing βsclnot supported orTHIGHbeing 0 is a no from the function π
π SEE ALSO π
- Kernel file
./drivers/i2c/busses/i2c-xiic.c - struct
xiic_i2c(9) - struct
timing_regs(9)
go read those if you want the whole friend group of related things, iykyk ππ
catch you later bestie π«Ά this page came from ./drivers/i2c/busses, dated October 2026, and itβs serving full Kernel API Manual energy. periodt π
β¨
π¦ 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