ti_errata814...ap_read_temp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ti_errata814_bandgap_read_temp β€” a.k.a. "the dra7 temp-reading bestie" πŸ’–

okay so real quick, the manual name is Kernel API Manual and this whole page is literally about one tiny helper function, but it's an iconic helper function, so let's go πŸŽ€


✨ NAME ✨

ti_errata814_bandgap_read_temp β€” a helper function to read the dra7 sensor temperature πŸ¦‹

like, it reads the temp. that's the vibe. that's the whole job. and it does it correctly, which is the part that matters. iykyk πŸ’…


🌸 SYNOPSIS 🌸

u32 ti_errata814_bandgap_read_temp (struct ti_bandgap *bgp , u32 reg );

look at her. pristine. no notes. πŸ‘‘


🫢 ARGUMENTS 🫢

  • bgp β€” pointer to the ti_bandgap structure ✨ (like, the whole bandgap situation, handed to you on a platter)
  • reg β€” the desired register (offset) that you wanna read πŸ’–

two args. that's it. not complicated, bestie.


πŸ”₯ DESCRIPTION πŸ”₯

so this function reads the dra7 bandgap sensor temperature, and the reason it exists as its own whole separate function is genuinely so funny β€” it's here to workaround the errata "Bandgap Temperature read Dtemp can be corrupted" β€” Errata ID: i814. πŸ’€

like yeah. the hardware was being messy. so we wrapped it. main character energy tbh.

here's the actual tea, no cap: read accesses to the registers listed below can be corrupted because of incorrect resynchronization between clock domains. incorrect resync!! between clock domains!! not me getting stressed about it 😭

read access to these registers can be corrupted:

CTRL_CORE_DTEMP_MPU/GPU/CORE/DSPEVE/IVA_n (n = 0 to 4)
CTRL_CORE_TEMP_SENSOR_MPU/GPU/CORE/DSPEVE/IVA_n

so like, yeah. n = 0 to 4, five flavors of each, and every single one of them can hand you garbage if you go around this. that's the whole reason she's here. respect the helper function. πŸ™

⚠️ lowkey important: this is a workaround for corrupted reads. do not try to be clever and read those registers yourself. let the function cook. πŸ”₯

🌈 RETURN 🌈

returns the register value. that's the return. the value. of the register. periodt. πŸ’…


πŸŽ€ SEE ALSO πŸŽ€

the kernel file, aka where the magic actually lives:

  • ./drivers/thermal/ti-soc-thermal/ti-bandgap.c

and now, the whole friend group πŸ’– (seriously, she has SO many friends):

all of them. every single one. i don't make the rules, i just list them πŸ’œ


okay that's the whole page!! mwah!! πŸ§šβ€β™€οΈ

this cutie lives in ./drivers/thermal/ti-soc-thermal, the manual is dated October 2026, and the page is literally called ti_errata814...ap_read_temp(9) β€” yes, that's the name, don't come for her, it's abbreviated and it's slaying πŸ“βœ¨

πŸ“¦ where this page comes from