STRUCT TI_BANDGAP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct ti_bandgap(9) πŸ¦‹

okay so bestie, we're in the Kernel API Manual today and we're talking about struct ti_bandgap β€” literally the bandgap device structure, no cap πŸ’…


✨ NAME ✨

struct ti_bandgap β€” the bandgap device structure 🫢


🌸 SYNOPSIS 🌸

struct ti_bandgap {
    struct device                   *dev;
    void __iomem                    *base;
    const struct ti_bandgap_data    *conf;
    struct temp_sensor_regval       *regval;
    struct clk                      *fclock;
    struct clk                      *div_clk;
    spinlock_t lock;
    int irq;
    struct gpio_desc                *tshut_gpiod;
    u32 clk_rate;
    struct notifier_block           nb;
    unsigned int is_suspended:1;
 };

look at her. the whole squad is in there. πŸ‘‘


πŸŽ€ Members πŸŽ€

  • dev β€” a struct device pointer, the classic device handle bestie πŸ’–
  • base β€” the io memory base address, where the magic lives ✨
  • conf β€” a struct holding the bandgap configuration set (like # sensors, conv_table, etc.) β€” this is where all the specifics are hiding πŸ‘€
  • regval β€” the temperature sensor register values πŸ’«
  • fclock β€” pointer to the functional clock of the temperature sensor ⏰
  • div_clk β€” pointer to the divider clock of the temperature sensor fclk πŸ•°οΈ
  • lock β€” a spinlock for the ti_bandgap structure πŸ”’
  • irq β€” the MPU IRQ number for the thermal alert 🚨
  • tshut_gpiod β€” a struct gpio_desc pointer… and ngl the page does not give her a blurb, she's just sitting there in the struct being iconic πŸ™ˆ
  • clk_rate β€” holds the current clock rate πŸ“ˆ
  • nb β€” a struct notifier_block… again, no blurb on this page, she's a mystery and we respect it πŸ’€
  • is_suspended:1 β€” an unsigned int bitfield, one whole bit of suspended-ness πŸŒ™ (also blurb-less on this page, fr fr)

πŸ’œ Description πŸ’œ

so this is the bandgap device structure β€” the one representing the bandgap device instance. she holds most of the dynamic stuff πŸŒ€

configurations and sensor specific entries? those live inside the conf structure. periodt. that's the whole vibe check.


🌈 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_temp_sensor(9)
  • ti bandgap feature types(9)
  • struct ti_bandgap_data(9)

bestie please note: the Members list above covers everything the page actually documents β€” tshut_gpiod, nb, and is_suspended:1 are in the struct but the page gives them no write-up, so don't go making up behaviour for them πŸ’…

okay that's the whole page, you ate it, main character energy all the way through πŸ“πŸ§š and this lil masterpiece comes straight out of ./drivers/thermal/ti-soc-thermal, dated October 2026 β€” mwah, see you in the next doc bestie πŸ˜­πŸ’–

πŸ“¦ where this page comes from