STRUCT EMC2305_DATA(9)
π NAME π
ok so struct emc2305_data β bestie, it's literally just device-specific data π like all the per-device bookkeeping for this hwmon driver lives in here, no cap β¨
this is a page from the Kernel API Manual, section 9 β yes we're in the big-kid kernel docs section, iykyk π
πΈ SYNOPSIS πΈ
struct emc2305_data {
struct i2c_client *client;
struct device *hwmon_dev;
u8 max_state;
u8 pwm_num;
u8 pwm_output_mask;
u8 pwm_polarity_mask;
bool pwm_separate;
s16 pwm_shutdown[EMC2305_PWM_MAX];
u8 pwm_min[EMC2305_PWM_MAX];
u16 pwm_freq[EMC2305_PWM_MAX];
struct emc2305_cdev_data cdev_data[EMC2305_PWM_MAX];
};
like, that's the whole struct, laid out exactly, don't @ me π«Ά
π¦ MEMBERS π¦
okay let's go member by member, main character energy only π
clientβ the i2c client π that's your ride-or-die i2c connection, fr.hwmon_devβ the hwmon device β¨ the actual hardware-monitoring device this all hangs off of.max_stateβ maximum cooling state of the cooling device π₯Ά like how hard this thing can possibly go.pwm_numβ number of PWM channels π count 'em.pwm_output_maskβ PWM output mask π a cute lil mask for the outputs.pwm_polarity_maskβ PWM polarity mask π same vibe, but for polarity.pwm_separateβ separate PWM settings for every channel π because sometimes each channel wants to do its own thing, and honestly? valid.pwm_shutdownβ Set shutdown PWM. π thes16array ([EMC2305_PWM_MAX]) holding the shutdown PWM values. (yes the original sentence has a period at the end, keeping it, periodt.)pwm_minβ array of minimum PWM per channel πu8array sized[EMC2305_PWM_MAX], the floor value for each channel.pwm_freqβ array of PWM frequency per channel π₯u16array sized[EMC2305_PWM_MAX], how fast each channel vibes.cdev_dataβ array of cooling devices data πstruct emc2305_cdev_dataarray sized[EMC2305_PWM_MAX], all the cooling-device deets.
β SEE ALSO β
- Kernel file
./drivers/hwmon/emc2305.cπ β the source, go read it bestie, it's giving lore struct emc2305_cdev_data(9)π§ β the companion struct, the duo we didn't know we needed
lowkey reminder:EMC2305_PWM_MAXis the array size used forpwm_shutdown,pwm_min,pwm_freq, andcdev_dataβ keep it exact, no guessing π«Ά
aaaand that's the page!! π brought to you by ./drivers/hwmon, dated October 2026, from the Kernel API Manual β struct emc2305_data(9), slay, bye bestie ππ
π¦ 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