STRUCT TI_BANDGAP_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 features field, obviously, slay)
  • the clock names used to feed this device (both of them, fclock_name and div_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.h bandgap 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