show_protocols(9)
π show_protocols(9) β like, the Kernel API Manual page, bestie π
okay so this is a page from the Kernel API Manual (yes, the show_protocols(9) one, that's the name of the whole vibe), and honestly? it's a little baddie. let's get into it β¨
πΈ NAME πΈ
show_protocols β shows the current IR protocol(s) π
π SYNOPSIS π
ssize_t show_protocols (struct device *device , struct device_attribute
*mattr , char *buf );
like, that's the whole signature. eat it up. π
π¦ ARGUMENTS π¦
deviceβ the device descriptor π«Άmattrβ the device attribute structbufβ a pointer to the output buffer, ok so this is where the good stuff goes
β¨ DESCRIPTION β¨
so this routine? it's a callback routine for input read β it does the IR protocol type(s) thing. it gets triggered when someone reads /sys/class/rc/rc?/protocols π and it returns the protocol names of the supported protocols. and here's the cute part: the enabled protocols are printed in brackets π₯ iykyk.
also dev->lock gets taken, and that's on purpose β it's guarding against races between store_protocols and show_protocols. literally just keeping things from getting messy, no cap. π
bestie be aware: that lock is doing real work, don't be out here thinking it's decorative π
π SEE ALSO π
- kernel file
./drivers/media/rc/rc-main.c 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)parse_protocol_change(9)store_protocols(9)show_filter(9)store_filter(9)show_wakeup_protocols(9)store_wakeup_protocols(9)
like, that's the whole friend group right there. main character energy from every single one. π
and that's the page!! π§ source is ./drivers/media/rc, and the date on this lil baddie is October 2026 β screenshot it, remember it, periodt. ππ
π¦ 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