read_i2c(9)
πΈ read_i2c(9) β the Kernel API Manual page, bestie edition πΈ
okay so this is the man page for read_i2c, straight out of the Kernel API Manual, and honestly? she's short but she's doing her thing. let's get into it π
β¨ NAME β¨
read_i2c β literally just: read from an I2C client device. that's the whole vibe. π¦
β¨ SYNOPSIS β¨
int read_i2c (struct nmk_i2c_dev *priv , u16 flags );
like yes, that's the signature, no cap, copy it exactly bestie π
β¨ ARGUMENTS β¨
privβ the private data of the I2C Driver. it's the driver's own little bag of stuff, and you're handing it over. πflagsβ the message flags. yes, flags. iconic behavior honestly. β
β¨ DESCRIPTION β¨
so this function reads from the i2c client device when the controller is in master mode. main character controller energy only π
here's the thing though β there's a completion timeout. and if there's no transfer before that timeout hits? boom, an error is returned. not me getting ghosted by the bus π
fr fr: no transfer before timeout = error returned. that's not a vibe, that's just the rules. π
β¨ SEE ALSO β¨
the kernel file is ./drivers/i2c/busses/i2c-nomadik.c β go peek at her, she's the source of truth π«Ά
and then the whole friend group:
struct i2c_vendor_data(9)struct i2c_nmk_client(9)struct nmk_i2c_dev(9)flush_i2c_fifo(9)disable_all_interrupts(9)clear_all_interrupts(9)init_hw(9)load_i2c_mcr_reg(9)setup_i2c_controller(9)write_i2c(9)β her sibling, the writer one βοΈnmk_i2c_xfer_one(9)nmk_i2c_xfer(9)disable_interrupts(9)i2c_irq_handler(9)
and that's the page!! π source is ./drivers/i2c/busses, dated October 2026, and it's read_i2c(9) β slay, periodt, go read your i2c devices responsibly bestie πβ¨π
π¦ 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