store_filter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ store_filter(9) ✨

okay so welcome to the Kernel API Manual, bestie: this is store_filter(9), and she is literally the little write-side glow-up for your scancode filter. no cap πŸŽ€


🌸 NAME 🌸

store_filter β€” changes the scancode filter value. periodt.


🌈 SYNOPSIS 🌈

ssize_t store_filter (struct device *device , struct device_attribute
       *attr , const char *buf , size_t len );

🧚 ARGUMENTS 🧚

  • device β€” the device descriptor. yes, the whole device vibe πŸ’–
  • attr β€” the device attribute struct.
  • buf β€” a pointer to the input buffer.
  • len β€” length of the input buffer.

πŸ’… DESCRIPTION πŸ’…

This routine is for changing a scancode filter value or mask. it gets triggered by writing to /sys/class/rc/rc?/[wakeup_]filter[_mask] β€” that path is the whole entrance, iykyk ✨

Returns -EINVAL if an invalid filter value for the current protocol was specified, or if scancode filtering is not supported by the driver. otherwise it returns len. slay πŸ™ˆ

Bits of the filter value corresponding to set bits in the filter mask are compared against input scancodes, and non-matching scancodes are discarded. so the mask is like β€œthese bits? they matter,” and any scancode that doesn’t match gets the discard treatment πŸ”₯

dev->lock is taken to guard against races between store_filter and show_filter. no racing, no chaos, we lock it down πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/media/rc/rc-main.c, and the whole friend group is:


source/date + page vibe: ./drivers/media/rc, October 2026, store_filter(9) β€” bye bestie, go write that filter πŸ’–

πŸ“¦ where this page comes from