STRUCT MBG_TM_CHIP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ NAME

struct mbg_tm_chip β€” MBG thermal monitor device data. that's it, that's the whole vibe: it's the little struct holding all the tea about one MBG thermal monitor device πŸ’…

okay real talk, we're in the Kernel API Manual bestie, so this is kernel-struct lore, not user-facing stuff. but it's lowkey iconic so let's go 🫢


✨ SYNOPSIS

struct mbg_tm_chip {
    struct regmap                   *map;
    struct device                   *dev;
    struct thermal_zone_device      *tz_dev;
    struct mutex                    lock;
    unsigned int                    base;
    int irq;
    int last_temp;
    bool last_thres_crossed;
    struct iio_channel              *adc;
 };

no cap, that's the whole layout. now let's meet the members one by one, they each have main character energy πŸ‘‘


πŸŽ€ Members

  • map β€” the regmap for accessing MBG thermal registers. literally the doorway to all the register gossip ✨
  • dev β€” the mbg_tm_chip device. hi bestie, it's the device itself 🌸
  • tz_dev β€” the thermal zone device registered with the thermal framework. it's official, it's in the framework, it's got a badge 🎫
  • lock β€” the mbg_tm_chip lock for set trip temperature. keeping things from stepping on each other, very responsible of it πŸ”’
  • base β€” base register offset for this MBG instance. your starting coordinates, iykyk πŸ“
  • irq β€” interrupt line used to signal threshold events. when something crosses a line, this is the one screaming about it 😭
  • last_temp β€” last measured temperature. the most recent reading, no guessing πŸ”₯
  • last_thres_crossed β€” indicates whether the last interrupt crossed a threshold. a yes/no vibe check on the last interrupt 🧚
  • adc β€” IIO ADC channel used for temperature sensing. this is where the temperature actually comes from, periodt πŸ’œ

πŸ‘€ SEE ALSO

  • Kernel file ./drivers/thermal/qcom/qcom-spmi-mbg-tm.c β€” the struct's actual home, go say hi 🏠
  • mbg_map_table(9) ⭐

and that's the page bestie!! this little beauty lives under ./drivers/thermal/qcom, straight from the Kernel API Manual, dated October 2026 πŸŽ€ go forth and read those registers, mwah πŸ’–

πŸ“¦ where this page comes from