cec_notifier...dap_register(9)
πΈ NAME πΈ
okay so bestie, cec_notifier_cec_adap_register β it finds or creates a new cec_notifier for the given device. that's the whole vibe. π
(this is living in the Kernel API Manual, in case you were wondering where we're at π)
β¨ SYNOPSIS β¨
struct cec_notifier * cec_notifier_cec_adap_register (struct device
*hdmi_dev , const char *port_name , struct cec_adapter *adap );
like, she takes three things and hands you back a struct cec_notifier *. iconic behavior honestly π¦
π ARGUMENTS π
hdmi_devβ the HDMI device that sends the events. that's her whole job.port_nameβ the connector name, aka which connector the event is coming from. may beNULLπ«Ά β and that's totally fine if there is always only one HDMI connector created by the HDMI device. one connector, no name needed, no cap.adapβ the cec adapter that registered this notifier. she's the one holding the registration. π
π₯ DESCRIPTION π₯
okay so here's the tea β β it's literally a two-branch situation:
branch one: if a notifier for device dev and connector port_name already exists, then you just increase the refcount and return that notifier. reuse, recycle, slay. β»οΈβ¨
branch two: if it doesn't exist, then you allocate a new notifier struct and return a pointer to that new struct. brand new, fresh out the box, main character energy. π
and the sad part π β return NULL if the memory could not be allocated. that's the fail case, and no amount of good vibes fixes it. ngl, keep an eye out for that one.
π SEE ALSO π
- Kernel file:
./include/media/cec-notifier.hβ go read it, iykyk π cec_notifier_conn_register(9)cec_notifier_conn_unregister(9)cec_notifier_cec_adap_unregister(9)cec_notifier_set_phys_addr(9)cec_notifier_set_phys_addr_from_edid(9)cec_notifier_parse_hdmi_phandle(9)cec_notifier_phys_addr_invalidate(9)
the whole friend group, fr fr π«Άπ
and that's the page!! πΈ mwah π it's filed under ./include/media, dated October 2026, and yes the name at the top and bottom is cec_notifier...dap_register(9) β go off, bestie. π§ββοΈβ
π¦ 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