STRUCT EMC2305_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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. πŸ›‘ the s16 array ([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 πŸ“ u8 array sized [EMC2305_PWM_MAX], the floor value for each channel.
  • pwm_freq β€” array of PWM frequency per channel πŸ”₯ u16 array sized [EMC2305_PWM_MAX], how fast each channel vibes.
  • cdev_data β€” array of cooling devices data πŸ‘‘ struct emc2305_cdev_data array 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_MAX is the array size used for pwm_shutdown, pwm_min, pwm_freq, and cdev_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