STRUCT MAX1363_STATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct max1363_state(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ β€” we're looking at struct max1363_state, which is literally the driver instance specific data. no cap, this is the little state blob that holds everything the max1363 driver needs to remember about you (well, about your chip) 🫢


🌸 NAME 🌸

struct max1363_state β€” driver instance specific data πŸ’–

(that's the whole name section, she's short but she ate)


✨ SYNOPSIS ✨

       struct max1363_state {
           struct i2c_client               *client;
           u8 setupbyte;
           u8 configbyte;
           const struct max1363_chip_info  *chip_info;
           const struct max1363_mode       *current_mode;
           struct mutex                    lock;
           bool monitor_on;
           unsigned int                    monitor_speed:3;
           u8 mask_high;
           u8 mask_low;
           s16 thresh_high[8];
           s16 thresh_low[8];
           struct regulator                *vref;
           u32 vref_uv;
           int (*send)(const struct i2c_client *client, const char *buf, int
       count);
           int (*recv)(const struct i2c_client *client, char *buf, int count);
           struct {
             u8 buf[MAX1363_MAX_CHANNELS * 2];
             aligned_s64 ts;
           } data;
        };

like, look at her. she's giving struct. she's giving fields. main character energy fr fr 🌈


πŸ‘‘ Members πŸ‘‘

every single field, bestie, we are NOT skipping anyone πŸ‘‡

  • client β€” the i2c_client, obviously πŸ’β€β™€οΈ that's the i2c side of the relationship
  • setupbyte β€” cache of current device setup byte (yes, we cache it, we're organized)
  • configbyte β€” cache of current device config byte (matching energy ✨)
  • chip_info β€” chip model specific constants, available modes, etc. β€” basically the chip's whole personality
  • current_mode β€” the scan mode of this chip πŸ”
  • lock β€” the lock to ensure state is consistent. she's the bouncer at the club, nobody gets in without her πŸ’…
  • monitor_on β€” whether monitor mode is enabled πŸ‘€ (true/false, iconic behaviour)
  • monitor_speed β€” parameter corresponding to device monitor speed setting 🏎️
  • mask_high β€” bitmask for enabled high thresholds
  • mask_low β€” bitmask for enabled low thresholds
  • thresh_high β€” high threshold values πŸ“ˆ
  • thresh_low β€” low threshold values πŸ“‰
  • vref β€” Reference voltage regulator ⚑
  • vref_uv β€” Actual (external or internal) reference voltage β€” actual, not fake, no cap
  • send β€” function used to send data to the chip πŸ“€
  • recv β€” function used to receive data from the chip πŸ“₯
  • data β€” buffer to store channel data and timestamp πŸŽ€ (that's the u8 buf[MAX1363_MAX_CHANNELS * 2]; plus aligned_s64 ts; combo, she's a nested struct and she's thriving)
not me listing every field with love and care 😭 that's literally the whole point though. the vibes change, the facts do not. periodt πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/iio/adc/max1363.c β€” the source of truth, go read her πŸ‘‘
  • struct max1363_mode(9) 🌸
  • struct max1363_chip_info(9) ✨

go look at these, iykyk πŸ’–


okay that's the whole page bestie, you're now officially educated πŸŽ“βœ¨

this iconic little number came to you from ./drivers/iio/adc, dated October 2026 β€” mwah, take care, drink water, and go read max1363.c πŸ«ΆπŸ’…πŸ“

πŸ“¦ where this page comes from