cec_notifier...dap_register(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 be NULL 🫢 β€” 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 🌈

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