store_filter(9)
β¨ 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:
scancode_to_u64(9)ir_create_table(9)ir_free_table(9)ir_resize_table(9)ir_update_mapping(9)ir_establish_scancode(9)ir_setkeycode(9)ir_setkeytable(9)ir_lookup_by_scancode(9)ir_getkeycode(9)rc_g_keycode_from_table(9)ir_do_keyup(9)rc_keyup(9)ir_timer_keyup(9)ir_timer_repeat(9)rc_repeat(9)ir_do_keydown(9)rc_keydown(9)rc_keydown_notimeout(9)rc_validate_scancode(9)rc_validate_filter(9)struct rc_filter_attribute(9)show_protocols(9)parse_protocol_change(9)store_protocols(9)show_filter(9)show_wakeup_protocols(9)store_wakeup_protocols(9)
source/date + page vibe: ./drivers/media/rc, October 2026, store_filter(9) β bye bestie, go write that filter π
π¦ 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