tpm_cr50_i2c_write(9)
π« tpm_cr50_i2c_write(9) β the Kernel API Manual, bestie edition π«
okay so this is tpm_cr50_i2c_write, from the Kernel API Manual, and honestly? she's a little function with one job and she does it. no cap. let's get into it π«Ά
β¨ NAME β¨
tpm_cr50_i2c_write β literally just: write to a TPM register. that's the whole vibe. π
π¦ SYNOPSIS π¦
int tpm_cr50_i2c_write (struct tpm_chip *chip , u8 addr , u8 *buffer ,
size_t len );
look at her go. four args, one int return, iconic behavior only π
π ARGUMENTS π
chipβ a TPM chip. that's it, that's the whole description, she is what she is πaddrβ the register address you're writing to. the destination. the address. iykyk πbufferβ the actual data you wanna write. the payload, the main character πΈlenβ number of bytes to write. how much of the good stuff. the count, bestie π’
π DESCRIPTION π
okay so here's the whole lil routine, and it's genuinely cute:
the address you handed over gets prepended to the data in 'buffer' β so it's address first, data second, combined into one thing π« β and then that combined address+data gets sent straight to the TPM. and then? we wait. we literally just wait for the TPM to indicate it's done writing. that's the whole flow. no extra steps, no drama, just send and wait π§
β RETURN β
0β Success. we ate. π₯-errnoβ a POSIX error code. something went sideways, check your errno, don't shoot the messenger π
π SEE ALSO π
kernel file ./drivers/char/tpm/tpm_tis_i2c_cr50.c β and the whole friend group:
struct tpm_i2c_cr50_priv_data(9)tpm_cr50_i2c_int_handler(9)tpm_cr50_i2c_wait_tpm_ready(9)tpm_cr50_i2c_enable_tpm_irq(9)tpm_cr50_i2c_disable_tpm_irq(9)tpm_cr50_i2c_transfer_message(9)tpm_cr50_i2c_read(9)tpm_cr50_check_locality(9)tpm_cr50_release_locality(9)tpm_cr50_request_locality(9)tpm_cr50_i2c_tis_status(9)tpm_cr50_i2c_tis_set_ready(9)tpm_cr50_i2c_get_burst_and_status(9)tpm_cr50_i2c_tis_recv(9)tpm_cr50_i2c_tis_send(9)tpm_cr50_i2c_req_canceled(9)tpm_cr50_vid_to_name(9)tpm_cr50_i2c_probe(9)tpm_cr50_i2c_remove(9)
the whole squad, fr fr. go read them, they're all slay π β¨
ngl, that's the entire page. short and sweet, just like she should be π
anyway bestie, that's a wrap β this lil page lives in ./drivers/char/tpm, dated October 2026, and it's giving kernel documentation excellence π mwah π
π¦ 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