STRUCT PM8XXX_VIB(9)
π 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 abool. on or off. that's it. vibe check passed π¦reg_vib_drvβ theregs->drv_addrregister value. it's au8, and yes it's literally holding that register's value π
π SEE ALSO π
Kernel file ./drivers/input/misc/pm8xxx-vibrator.cβ and its friends:pm8xxx_vib_set(9)pm8xxx_work_handler(9)pm8xxx_vib_close(9)pm8xxx_vib_play_effect(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms