STRUCT PM8XXX_VIB(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct pm8xxx_vib(9) β€” the Kernel API Manual moment

okay so bestie, welcome to the <pink>kernel API manual</pink> for struct pm8xxx_vib, which is genuinely just… the structure to hold vibrator data πŸŽ€ that's the whole vibe. literally the little home where your vibrator's info lives. no cap.


✨ SYNOPSIS ✨

struct pm8xxx_vib {
    struct input_dev *vib_input_dev;
    struct work_struct work;
    struct regmap *regmap;
    const struct pm8xxx_regs *regs;
    unsigned int enable_addr;
    unsigned int drv_addr;
    unsigned int drv2_addr;
    int speed;
    int level;
    bool active;
    u8 reg_vib_drv;
 };

look at her. eleven fields. main character energy, honestly πŸ‘‘ and every single one matters, so let's go through them one by one, no skipping πŸ’–


🌸 Members 🌸

  • vib_input_dev β€” the input device that supports force feedback. this is the one that actually brings the haptics, the rumble, the whole moment ✨
  • work β€” a work structure, and its entire job is to set the vibration parameters. it's giving backstage crew energy, doing the work so the vibes can happen 🫢
  • regmap β€” the regmap for register read/write. yes you read (and write) that correctly πŸ’…
  • regs β€” the registers' info. all the little register details live here πŸ“‹
  • enable_addr β€” the vibrator enable register. the on switch, basically. the yes address πŸ’š
  • drv_addr β€” the vibrator drive strength register. how hard we're going, address edition πŸ”₯
  • drv2_addr β€” the vibrator drive strength upper byte register. that's the upper byte specifically, don't forget the upper byte bestie 😭
  • speed β€” speed of vibration set from userland. userland gets to pick how fast, iconic ⚑
  • level β€” level of vibration to set in the chip. this one's set in the chip, not userland, important distinction πŸŽ€
  • active β€” the state of the vibrator. it's a bool. on or off. that's it. vibe check passed πŸ¦‹
  • reg_vib_drv β€” the regs->drv_addr register value. it's a u8, and yes it's literally holding that register's value πŸ’œ

πŸ” SEE ALSO πŸ”

like, go read them, they're all in the same little ./drivers/input/misc neighborhood, iykyk 🌈


okay that's the whole page, you ate that πŸ’… mwah 🫢

sign-off time: this iconic little doc comes from ./drivers/input/misc, dated October 2026 β€” so it's technically from the future, which is very her β­πŸ’€

πŸ“¦ where this page comes from