STRUCT SVS_BANK(9)
β¨ NAME β¨
struct svs_bank β the svs bank representation, bestie π
(also hi, this page is part of the Kernel API Manual, section 9 β we love a credentialed icon π)
πΈ SYNOPSIS πΈ
okay so here's the whole struct, literally the entire vibe, copy-pasted exactly because we do NOT fumble the details:
struct svs_bank {
const struct svs_bank_pdata pdata;
struct device *dev;
struct device *opp_dev;
struct completion init_completion;
struct regulator *buck;
struct thermal_zone_device *tzd;
struct mutex lock;
int pm_runtime_enabled_count;
short int volt_od;
char *name;
enum svsb_phase phase;
u32 reg_data[SVSB_PHASE_MAX][SVS_REG_MAX];
u8 mode_support;
u32 opp_dfreq[MAX_OPP_ENTRIES];
u32 opp_dvolt[MAX_OPP_ENTRIES];
u32 freq_pct[MAX_OPP_ENTRIES];
u32 volt[MAX_OPP_ENTRIES];
u32 volt_flags;
u32 freq_base;
u32 turn_pt;
u32 vbin_turn_pt;
u32 core_sel;
u32 temp;
u16 age_voffset_in;
u16 dc_voffset_in;
u8 dvt_fixed;
u8 vmax;
u8 vmin;
u16 bts;
u16 mts;
u16 bdes;
u16 mdes;
u8 mtdes;
u8 dcbdet;
u8 dcmdet;
};
π¦ Members π¦
like a roll call but make it slay π β every single field, no skips, periodt:
pdataβ SVS Bank immutable config parameters (immutable = do not touch, she is who she is π)devβ bank deviceopp_devβ device for opp table/buck controlinit_completionβ the timeout completion for bank initbuckβ regulator used byopp_devtzdβ thermal zone device for getting temperature π‘οΈlockβ mutex lock to protect voltage update process (no cutting in line!!)pm_runtime_enabled_countβ bank pm runtime enabled countvolt_odβ bank voltage overdrivenameβ bank name π·οΈphaseβ bank current phasereg_dataβ bank register data in different phase for debug purposemode_supportβ bank mode supportopp_dfreqβ default opp frequency tableopp_dvoltβ default opp voltage tablefreq_pctβ frequency percent table for bank initvoltβ bank voltage tablevolt_flagsβ bank voltage flags π©freq_baseβ reference frequency for bank initturn_ptβ 2-line turn point tells whichopp_voltcalculated by high/low bankvbin_turn_ptβ voltage bin turn point helps know whichsvsb_voltshould be overriddencore_selβ bank selectiontempβ bank temperatureage_voffset_inβ bank age voltage offsetdc_voffset_inβ bank dc voltage offsetdvt_fixedβ bank dvt fixed valuevmaxβ bank voltage maximum β¬οΈvminβ bank voltage minimum β¬οΈbtsβ svs efuse datamtsβ svs efuse databdesβ svs efuse datamdesβ svs efuse datamtdesβ svs efuse datadcbdetβ svs efuse datadcmdetβ svs efuse data
(and yes, bts, mts, bdes, mdes, mtdes, dcbdet and dcmdet all get the exact same description β the manpage said it, so I said it, fr fr π)
π Description π
okay so THE lore π«Ά β the svs bank generates suitable voltages using this general math equation down below, and then it hands those voltages over to the opp voltage table:
opp_volt[i] = (volt[i] * volt_step) + volt_base;
that's it, that's the whole bit β bank makes voltages, opp voltage table receives voltages, everyone claps πβ¨
π SEE ALSO π
go be nosy, the receipts are all here π₯:
- Kernel file
./drivers/soc/mediatek/mtk-svs.c enum svsb_sw_id(9)enum svsb_type(9)enum svsb_phase(9)struct svs_platform(9)struct svs_bank_pdata(9)
k bye bestie, go read the source, drink water, and remember: ./drivers/soc/mediatek, October 2026 β that's the version + date tea ππ
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