STRUCT ROCKCHIP_TSADC_CHIP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ struct rockchip_tsadc_chip(9)

okay so bestie, welcome to the Kernel API Manual πŸ’– β€” this page is literally all about struct rockchip_tsadc_chip, and its whole entire job is to hold the private data of tsadc chip. that's it, that's the thesis. no cap, it's the little backpack the thermal sensor driver carries around everywhere πŸŽ’βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the whole glow-up, laid out exactly as the kernel gods wrote it:

struct rockchip_tsadc_chip {
    int chn_offset;
    int chn_num;
    int trim_slope;
    int tshut_temp;
    enum tshut_mode tshut_mode;
    enum tshut_polarity tshut_polarity;
    bool grf_required;
    void (*initialize)(struct regmap *grf, void __iomem *reg, enum tshut_polarity p);
    void (*irq_ack)(void __iomem *reg);
    void (*control)(void __iomem *reg, bool on);
    int (*get_temp)(const struct chip_tsadc_table *table, int chn, void __iomem *reg, int *temp);
    int (*set_alarm_temp)(const struct chip_tsadc_table *table, int chn, void __iomem *reg, int temp);
    int (*set_tshut_temp)(const struct chip_tsadc_table *table, int chn, void __iomem *reg, int temp);
    void (*set_tshut_mode)(int chn, void __iomem *reg, enum tshut_mode m);
    int (*get_trim_code)(const struct chip_tsadc_table *table, int code, int trim_base, int trim_base_frac);
    struct chip_tsadc_table table;
};

it's giving "function pointer buffet" and honestly? we ate πŸ“

πŸŽ€ Members πŸŽ€

okay now let's meet the cast, one member at a time β€” every single one, no skipping πŸ’…

  • chn_offset β€” the channel offset of the first channel. where the counting starts, basically the group chat's first member 🌸
  • chn_num β€” the channel number of tsadc chip. how many channels this chip is serving, iconic headcount energy πŸ‘‘
  • trim_slope β€” used to convert the trim code to a temperature in millicelsius. it's the math-y one, doing the celsius glow-up ✨
  • tshut_temp β€” the hardware-controlled shutdown temperature value, with no trim. raw, unfiltered, no edits 🫢
  • tshut_mode β€” the hardware-controlled shutdown mode (0:CRU 1:GPIO). pick your fighter 😭
  • tshut_polarity β€” the hardware-controlled active polarity (0:LOW 1:HIGH). low key or high key, literally πŸ”₯
  • grf_required β€” true, if a GRF is required for proper functionality. so if it's true, don't go forgetting the GRF, bestie πŸ’€
  • initialize β€” SoC special initialize tsadc controller method. the main character entrance for each SoC 🌈
  • irq_ack β€” clear the interrupt. yes queen, acknowledge it and move on πŸ’…
  • control β€” enable/disable method for the tsadc controller. the on/off switch of destiny ⭐
  • get_temp β€” get the raw temperature, unadjusted by trim. naked temperature, not yet dressed for the occasion πŸ™ˆ
  • set_alarm_temp β€” set the high temperature interrupt. the "girl wake UP" alarm 🚨
  • set_tshut_temp β€” set the hardware-controlled shutdown temperature. the actual "we're shutting this down" temperature 😀
  • set_tshut_mode β€” set the hardware-controlled shutdown mode. CRU or GPIO, choose wisely πŸ¦‹
  • get_trim_code β€” convert a hardware temperature code to one adjusted for by trim. the code's little makeover montage πŸŽ€
  • table β€” the chip-specific conversion table. the cheat sheet, the lore document, the vibe check reference πŸ“–

πŸ” SEE ALSO πŸ”

go read these next, iykyk πŸ’œ (they all live in the kernel file ./drivers/thermal/rockchip_thermal.c):


lowkey a reminder that this is the Kernel API Manual page for struct rockchip_tsadc_chip(9) β€” that's the manual name, that's the title, that's the moment πŸ’«

and that's the whole page, bestie, you understood it perfectly, i'm so proud of you fr fr 😭🫢

sign-off szn: this little masterpiece lives under ./drivers/thermal, dated October 2026, and it's the struct rockchip_tsadc_chip(9) page of the Kernel API Manual. slay, bye πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from