tpm_cr50_i2c_read(9)
π NAME π
okay so bestie, this one is tpm_cr50_i2c_read β it's the "Read from TPM register." girlie. that's the whole vibe. it reads. from a TPM. register. periodt β¨
(this is from the Kernel API Manual, section 9, if you were wondering where we're at π)
π SYNOPSIS π
int tpm_cr50_i2c_read (struct tpm_chip *chip , u8 addr , u8 *buffer ,
size_t len );
look at her. four arguments, one int return, zero drama π
π¦ ARGUMENTS π¦
chipβ a TPM chip. literally just the chip we're working with, she's the main character here πaddrβ the register address to read from. like, which register, bestie. you gotta say πbufferβ the read destination, provided by caller. so you bring the bucket, the function just fills it πͺ£lenβ number of bytes to read. don't be shy, tell her how many π«
πΈ DESCRIPTION πΈ
okay so here's the little routine she does, step by step, no cap:
- sends the register address byte to the TPM β¨
- then waits until the TPM is ready β either via interrupt signal or timeout expiration (whichever comes first, it's giving patient queen energy) β³
- then
lenbytes are read from the TPM response into the providedbufferπ
that's it. that's the whole flow. simple, iconic, does exactly what it says π«Ά
β RETURN β
0β Success. we ate. π-errnoβ a POSIX error code. so if something went sideways, you get a negative errno and not a cute moment ππ
π§ SEE ALSO π§
the whole friend group, fr fr. first up, the kernel file she lives in: ./drivers/char/tpm/tpm_tis_i2c_cr50.c π
then the extended squad β struct and functions, all in section 9:
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_write(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)
like, go read them too. iykyk π
and that's the whole page, bestie!! π this baby lives in ./drivers/char/tpm, dated October 2026, and yeah β she's tpm_cr50_i2c_read(9) until the end of time. slay π
β¨π¦
π¦ 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