ti_bandgap_read_temp(9)
π ti_bandgap_read_temp β bestie edition
okay so this is a page from the Kernel API Manual (yes, the (9) section, we're being fancy today β¨) and it's all about ti_bandgap_read_temp. it's literally the little helper that goes and gets the temperature. iconic behaviour, honestly. π
β¨ NAME β¨
ti_bandgap_read_temp β the helper function that reads the sensor temperature π«Ά
β¨ SYNOPSIS β¨
u32 ti_bandgap_read_temp (struct ti_bandgap *bgp , int id );
β¨ ARGUMENTS β¨
bgpβ a pointer to theti_bandgapstructure. that's your whole bandgap situation right there πidβ the bandgap sensor id. which sensor are we talking to, bestie? π
β¨ DESCRIPTION β¨
so this function is basically the designated driver for reading the sensor temperature register πβ¨ it bundles all the steps together in one place so nobody has to re-do the whole routine every time.
and why does it exist, you ask? because β plot twist β depending on which version of the bandgap device you've got, you might need to freeze the bandgap state machine first, before you go fetching the register value. π like, you gotta pause the whole vibe before you peek at the number. that's the whole reason this function is a thing. no cap.
β¨ RETURN β¨
the temperature, in ADC values π‘οΈβ¨
β¨ SEE ALSO β¨
- the kernel file
./drivers/thermal/ti-soc-thermal/ti-bandgap.cβ go read the source, iykyk π ti_bandgap_readl(9)ti_bandgap_writel(9)macro to update bits.(9)ti_bandgap_power(9)ti_errata814_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)
that's the whole read, bestie π this little chapter lives over in ./drivers/thermal/ti-soc-thermal, and it's dated October 2026 β yes, the future, we're built different βπ go touch some registers, ily, bye π¦πΈ
π¦ 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