STRUCT MBG_TM_CHIP(9)
π¦ 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
- 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