STRUCT TI_BANDGAP_DATA(9)
π struct ti_bandgap_data(9) β the bandgap config glow-up π
okay bestie, welcome to the Kernel API Manual page for struct ti_bandgap_data(9). this is the struct that holds all the static configuration tea for a bandgap device instance, and honestly? it's giving "blueprint era" and we're obsessed. π«Ά
β¨ NAME β¨
struct ti_bandgap_data β the ti bandgap data configuration structure. that's it, that's the vibe. π
πΈ SYNOPSIS πΈ
here's the whole squad, laid out exactly like this, no cap:
struct ti_bandgap_data {
unsigned int features;
const int *conv_table;
u32 adc_start_val;
u32 adc_end_val;
char *fclock_name;
char *div_ck_name;
int sensor_count;
int (*report_temperature)(struct ti_bandgap *bgp, int id);
int (*expose_sensor)(struct ti_bandgap *bgp, int id, char *domain);
int (*remove_sensor)(struct ti_bandgap *bgp, int id);
struct ti_temp_sensor sensors[];
};
like, every single field is here, and yes we're gonna go through all of them one by one because nobody gets left behind in this group chat. π
π¦ Members π¦
featuresβ a bitwise flag set that describes what this device can do. it's literally the device's personality traits, in bit form. β¨conv_tableβ pointer to the ADC-to-temperature conversion table. the sacred lookup scroll, if you will. πadc_start_valβ the ADC conversion table's starting value. where the table begins, periodt. π±adc_end_valβ the ADC conversion table's ending value. where the table wraps up, that's the whole journey. πfclock_nameβ the clock name of the functional clock. yes bestie, it has a name, and this field tells you it. β°div_ck_nameβ the clock name of the clock divisor. different clock, different name, we don't conflate them here. π°οΈsensor_countβ count of temperature sensors within this bandgap device. the headcount, so you know how many sensors are showing up to the party. πreport_temperatureβ callback to report thermal alert to the thermal API. this is the one that picks up the phone and tells the thermal API what's happening. π₯πexpose_sensorβ callback to export sensor to the thermal API. putting your sensor out there, main character energy. πremove_sensorβ callback to destroy sensor from the thermal API. the goodbye callback, it's fine, we're fine. πsensorsβ array of sensors present in this bandgap instance. the whole roster. π
π Description π
so this is a data structure that should hold most of the static configuration of a bandgap device instance. like, the stuff that doesn't change mid-call, the permanent lore. π
it should describe:
- which features this instance is capable of (the
featuresfield, obviously, slay) - the clock names used to feed this device (both of them,
fclock_nameanddiv_ck_name) - the amount of sensors and their configuration representation
- and how to export and unexport them to a thermal API
that's the whole job, and it does it beautifully. no notes. π
π§ SEE ALSO π§
- Kernel file
./drivers/thermal/ti-soc-thermal/ti-bandgap.hbandgap driver data structure(9) struct temp_sensor_registers(9)struct temp_sensor_data(9)struct temp_sensor_regval(9)struct ti_bandgap(9)struct ti_temp_sensor(9)- ti bandgap feature types(9)
bestie listen: this page lives in ./drivers/thermal/ti-soc-thermal, and it's stamped October 2026. so like, yes, note the date β it's literally right there in the footer energy of this whole thing. β
anyway that's the page, go forth and configure your bandgap, iykyk. π
π¦ 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