ti_bandgap_build(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 device struct 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 πŸ”₯

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