ti_errata814...ap_read_temp(9)
π
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 theti_bandgapstructure β¨ (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):
ti_bandgap_readl(9)ti_bandgap_writel(9)macro to update bits.(9)ti_bandgap_power(9)ti_bandgap_read_temp(9)ti_bandgap_talert_irq_handler(9)ti_bandgap_tshut_irq_handler(9)ti_bandgap_adc_to_mcelsius(9)ti_bandgap_validate(9)ti_bandgap_read_counter(9)ti_bandgap_read_counter_delay(9)ti_bandgap_read_update_interval(9)ti_bandgap_write_counter_delay(9)ti_bandgap_write_counter(9)ti_bandgap_write_update_interval(9)ti_bandgap_read_temperature(9)ti_bandgap_set_sensor_data(9)ti_bandgap_get_sensor_data(9)ti_bandgap_force_single_read(9)ti_bandgap_set_continuous_mode(9)ti_bandgap_get_trend(9)ti_bandgap_tshut_init(9)ti_bandgap_talert_init(9)ti_bandgap_build(9)
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
- 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