STRUCT HIDI2C_DEV_DESCRIPTOR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, this is struct hidi2c_dev_descriptor β€” the HIDI2C device descriptor definition. that's it, that's the whole vibe check. it's from the Kernel API Manual and it's literally the blueprint for how a HID-over-I2C device introduces itself. πŸ’…


✨ SYNOPSIS ✨

struct hidi2c_dev_descriptor {
    __le16 dev_desc_len;
    __le16 bcd_ver;
    __le16 report_desc_len;
    __le16 report_desc_reg;
    __le16 input_reg;
    __le16 max_input_len;
    __le16 output_reg;
    __le16 max_output_len;
    __le16 cmd_reg;
    __le16 data_reg;
    __le16 vendor_id;
    __le16 product_id;
    __le16 version_id;
    __le16 reserved0;
    __le16 reserved1;
 };

like, that's the whole struct, no notes. it ate. 🫢


πŸ’… Members πŸ’…

okay so every single field, in order, no skipping β€” this is the main character energy right here:

  • dev_desc_len β€” the length of the complete device descriptor, and it's fixed to 0x1E (30). no cap, it's always 30. πŸŽ€
  • bcd_ver β€” the version number of the HIDI2C protocol it supports, in binary coded decimal (BCD) format.
  • report_desc_len β€” the length of the report descriptor.
  • report_desc_reg β€” the register address where you go to retrieve the report descriptor.
  • input_reg β€” the register address where you go to retrieve the input report.
  • max_input_len β€” the length of the largest possible HID input (or feature) report.
  • output_reg β€” the register address you use to send the output report.
  • max_output_len β€” the length of the largest output (or feature) report.
  • cmd_reg β€” the register address to send a command. πŸ¦‹
  • data_reg β€” the register address to send command data.
  • vendor_id β€” the Device manufacturers vendor ID.
  • product_id β€” the Device unique model/product ID. iykyk. πŸ‘‘
  • version_id β€” the Device's unique version.
  • reserved0 β€” Reserved and should be 0.
  • reserved1 β€” Reserved and should be 0.
bestie, lowkey mind the reserved fields β€” they're reserved and should be 0, so fr fr keep them at 0. πŸ™ˆ

🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/hid-over-i2c.h struct
  • hidi2c_report_packet(9)

go read those if you want the full lore, they're iconic. ⭐

and that's the page, bestie!! πŸ’œ this came from ./include/linux, dated October 2026, and yes the footer still calls it struct hidi2...v_descriptor(9) because it's long and we respect the abbreviation era. slay. πŸ”₯

πŸ“¦ where this page comes from