STRUCT ALPS_DATA(9)
๐ NAME ๐
struct alps_data โ the private data structure for the ALPS driver, aka the driver's own little diary that nobody else gets to read ๐โจ
(hi bestie, welcome to struct alps_data(9), straight out of the Kernel API Manual โ yes we're in the kernel docs and yes we're gonna have a good time ๐ซถ)
โจ SYNOPSIS โจ
okay so the whole thing looks like this, and I need you to look at it with your whole chest because it's lowkey a lot:
struct alps_data {
struct psmouse *psmouse;
struct input_dev *dev2;
struct input_dev *dev3;
char phys2[32];
char phys3[32];
struct work_struct dev3_register_work;
const struct alps_nibble_commands *nibble_commands;
int addr_command;
u16 proto_version;
u8 byte0, mask0;
u8 dev_id[3];
u8 fw_ver[3];
int flags;
int x_max;
int y_max;
int x_bits;
int y_bits;
unsigned int x_res;
unsigned int y_res;
int (*hw_init)(struct psmouse *psmouse);
void (*process_packet)(struct psmouse *psmouse);
int (*decode_fields)(struct alps_fields *f, unsigned char *p, struct psmouse *psmouse);
void (*set_abs_params)(struct alps_data *priv, struct input_dev *dev1);
int prev_fin;
int multi_packet;
int second_touch;
unsigned char multi_data[6];
struct alps_fields f;
u8 quirks;
struct timer_list timer;
};
no cap, that's the whole vibe. now let's go field by field ๐
๐ MEMBERS ๐
okay so EVERY member, in order, no skipping, because we do not leave lore on the table:
psmouseโ pointer to the parentpsmousedevice. it's giving "my mom is the psmouse device" energy ๐dev2โ the trackstick device. and guess what, it can beNULL๐dev3โ a generic PS/2 mouse. also can beNULL, and its registering is delayed โ it's running late, like me to literally everything โฐphys2โ the physical path for the trackstick device ๐ค๏ธphys3โ the physical path for the generic PS/2 mouse ๐ค๏ธdev3_register_workโ aworkinstance used for registering the PS/2 mouse. it's the little task that gets the generic mouse through the door ๐ชnibble_commandsโ the command mapping used for touchpad register accesses. nibble. nibble. ๐ iykykaddr_commandโ the command used to tell the touchpad that a register address is coming next. it's literally "hey babe, an address follows" ๐ฌproto_versionโ tells you if this is V1/V2/V3/... ๐ข (yes the "..." is doing a lot of heavy lifting, don't come for it)byte0โ helps figure out whether a position report packet matches the known format for this model. the first byte of the report, ANDed withmask0, should matchbyte0. ok so byte0 & mask0 == byte0-core, if you will โจmask0โ the mask used to check the first byte of the report ๐ญfw_verโ a cached copy of the firmware version (EC report). it's not live, it's a screenshot ๐ธflagsโ additional device capabilities (passthrough port, trackstick, etc.) ๐ฉx_maxโ largest possible X position value ๐y_maxโ largest possible Y position value ๐x_bitsโ number of X bits in the MT bitmap ๐งฎy_bitsโ number of Y bits in the MT bitmap ๐งฎhw_initโ protocol-specific hardware init function. main character energy for the setup arc ๐ฑprocess_packetโ protocol-specific function to process a report packet ๐ฆdecode_fieldsโ protocol-specific function to read packet bitfields ๐set_abs_paramsโ protocol-specific function to configure theinput_devโ๏ธprev_finโ the finger bit from the previous packet ๐ (fin = finger, not fish, bestie)multi_packetโ multi-packet data currently in progress ๐งmulti_dataโ saved multi-packet data ๐พfโ decoded packet data fields, living in astruct alps_fields๐๏ธquirksโ bitmap ofALPS_QUIRK_*๐ (quirks are the personality traits of hardware)timerโ timer for flushing out the final report packet in the stream ๐ฝโจ (flush. get it. it's a timer.)
bestie real talk: the struct also hasdev_id,x_res,y_res, andsecond_touchup in the synopsis, but this page doesn't describe them. I am NOT inventing lore. we simply do not know them like that ๐คทโโ๏ธ
๐ฆ SEE ALSO ๐ฆ
go read these next, they're literally in the kernel file ./drivers/input/mouse/alps.h:
struct alps_protocol_info(9)struct alps_model_info(9)struct alps_nibble_commands(9)struct alps_fields(9)
๐ธ and that's the page!! this whole thing lives in ./drivers/input/mouse, it's dated October 2026, and it's filed under struct alps_data(9) โ go off, kernel docs, you ate ๐
๐โจ๐
๐ฆ 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