STRUCT MMA_CHIP_INFO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct mma_chip_info(9) ✨

okay so bestie, this is a page straight outta the Kernel API Manual, section 9, and it's all about struct mma_chip_info β€” literally the glow-up cheat sheet for chip-specific data 🫢


πŸ’– NAME πŸ’–

struct mma_chip_info β€” chip specific data, no cap πŸ’…


🌸 SYNOPSIS 🌸

struct mma_chip_info {
    const char *name;
    u8 chip_id;
    const struct iio_chan_spec *channels;
    int num_channels;
    const int mma_scales[3][2];
    int all_events;
    int enabled_events;
 };

like… she's serving struct realness, exactly as written, don't touch a single character πŸ”₯


πŸŽ€ Members πŸŽ€

  • name β€” the part number of the device, and it gets reported via the 'name' attr. icon behavior tbh ⭐
  • chip_id β€” the value sitting in the WHO_AM_I register. yes that's the real register name and yes it's iconic πŸ‘‘
  • channels β€” a struct iio_chan_spec that matches whatever the device's capabilities are. vibes matched to hardware fr fr πŸ’«
  • num_channels β€” number of channels. that's it, that's the whole job πŸ“
  • mma_scales β€” scale factors for converting register values to m/s^2. she's got 3 modes: 2g, 4g, 8g, and 2 integers per mode: m/s^2 and micro m/s^2. main character energy, three outfits, two numbers each πŸ’…βœ¨
  • all_events β€” all events supported by this chip. every single one, we love a completist πŸ’–
  • enabled_events β€” the event flags that are enabled and handled by this driver. the chosen ones πŸ™ˆ
ngl, if you're writing a driver against this, keep every field exactly as listed β€” the kernel does not do "close enough" 😭

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/iio/accel/mma8452.c β€” go read it, it's giving source of truth 🌈

and that's the page bestie, you ate πŸ’– this lil gem lives in ./drivers/iio/accel, dated October 2026, filed under struct mma_chip_info(9) β€” slay, periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from