STRUCT STMPE_TOUCH(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct stmpe_touch(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual page for struct stmpe_touch β€” yes it's a manual page, yes it's about kernel internals, and yes we're gonna make it cute. sit down, grab a strawberry drink πŸ“, and let's talk about the stmpe811 touch screen controller state ✨


πŸ’– NAME πŸ’–

struct stmpe_touch β€” the state struct for the stmpe811 touch screen controller, no cap 🫢


✨ SYNOPSIS ✨

here's the whole vibe, literally the exact struct, don't touch the formatting:

struct stmpe_touch {
    struct stmpe *stmpe;
    struct input_dev *idev;
    struct delayed_work work;
    struct device *dev;
    struct touchscreen_properties prop;
    u8 ave_ctrl;
    u8 touch_det_delay;
    u8 settling;
    u8 fraction_z;
    u8 i_drive;
 };

like… she's a struct, she's got fields, she's iconic πŸ‘‘


🌸 Members 🌸

okay now the fun part, let's meet the cast 🧚

  • stmpe β€” a pointer back to the STMPE MFD container. it's giving "take me home" energy, iykyk πŸ’…
  • idev β€” the registered input device. this one's the main character of the input subsystem fr fr πŸŽ€
  • work β€” a work item used to scan the device. she's delayed, she's a work, she gets stuff done ⭐
  • dev β€” a pointer back to the MFD cell struct device *. yes, another pointer home, we love a return address πŸ¦‹
  • prop β€” the Touchscreen properties. just the touchscreen prop situation, love that for us 🌈

now the u8 girlies, and bestie the numbers MATTER so read carefully πŸ‘€

  • ave_ctrl β€” Sample average control. the mapping is:
    • 0 β†’ 1 sample
    • 1 β†’ 2 samples
    • 2 β†’ 4 samples
    • 3 β†’ 8 samples
  • touch_det_delay β€” Touch detect interrupt delay. the lore:
    • 0 β†’ 10 us
    • 1 β†’ 50 us
    • 2 β†’ 100 us
    • 3 β†’ 500 us
    • 4 β†’ 1 ms
    • 5 β†’ 5 ms
    • 6 β†’ 10 ms
    • 7 β†’ 50 ms
recommended is 3 πŸ’– (yes, the 500 us one, that's the vibe)
  • settling β€” Panel driver settling time. the whole menu:
    • 0 β†’ 10 us
    • 1 β†’ 100 us
    • 2 β†’ 500 us
    • 3 β†’ 1 ms
    • 4 β†’ 5 ms
    • 5 β†’ 10 ms
    • 6 for 50 ms
    • 7 β†’ 100 ms
recommended is 2 ✨ (that's the 500 us one, okurrr)
  • fraction_z β€” Length of the fractional part in z, where fraction_z ([0..7]) = Count of the fractional part.
recommended is 7 πŸ”₯
  • i_drive β€” current limit value of the touchscreen drivers:
    • 0 β†’ 20 mA typical 35 mA max
    • 1 β†’ 50 mA typical 80 mA max

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/input/touchscreen/stmpe-ts.c β€” go read the source bestie, it ate πŸ’…

aaaand that's the page!! no notes, she's perfect πŸ’œ this lil' number lives over at ./drivers/input/touchscreen, dated October 2026, and honestly? obsessed. mwah πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from