ti_bandgap_build(9)
β¨ ti_bandgap_build(9) β¨
okay so this one lives in the Kernel API Manual and it's basically the glow-up phase for a bandgap sensor β bestie, let's get into it π
πΈ NAME πΈ
ti_bandgap_build β parse the DT and set up a struct ti_bandgap
π SYNOPSIS π
struct ti_bandgap * ti_bandgap_build (struct platform_device *pdev );
π¦ ARGUMENTS π¦
pdevβ pointer to the devicestruct platform_device. that's it, that's the whole input, she's low maintenance π
π« DESCRIPTION π«
so what this does is: it reads the device tree properties, and it does it according to the bandgap matching version β like, it checks which version it's dealing with first, no cap. π
then, based on the bandgap version and whatever capabilities come with it, it builds a struct ti_bandgap out of the required DT entries. it's giving "custom-fit outfit made from your device tree" energy, honestly. main character struct construction π
β RETURN β
returns a valid bandgap structure if it worked (slay β¨). if it didn't work, it returns an ERR_PTR return value β and bestie, you must verify that with IS_ERR. like, do not skip the vibe check on this one, fr fr π¨
π₯ SEE ALSO π₯
- Kernel file
./drivers/thermal/ti-soc-thermal/ti-bandgap.cβ the home base, go say hi π‘ 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_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)
literally the whole friend group π«Ά go read them all, iykyk.
and that's the page!! brought to you by the fine folks at ./drivers/thermal/ti-soc-thermal, dated October 2026, page ti_bandgap_build(9) β mwah, go build some bandgaps bestie ππ
π¦ 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