include/media/cec-notifier.h
Source file repositories/reference/linux-study-clean/include/media/cec-notifier.h
File Facts
- System
- Linux kernel
- Corpus path
include/media/cec-notifier.h- Extension
.h- Size
- 5146 bytes
- Lines
- 167
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/err.hmedia/cec.h
Detected Declarations
struct devicestruct edidstruct cec_adapterstruct cec_notifierfunction cec_notifier_conn_registerfunction cec_notifier_conn_unregisterfunction cec_notifier_cec_adap_unregisterfunction cec_notifier_phys_addr_invalidate
Annotated Snippet
#ifndef LINUX_CEC_NOTIFIER_H
#define LINUX_CEC_NOTIFIER_H
#include <linux/err.h>
#include <media/cec.h>
struct device;
struct edid;
struct cec_adapter;
struct cec_notifier;
#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)
/**
* cec_notifier_conn_register - find or create a new cec_notifier for the given
* HDMI device and connector tuple.
* @hdmi_dev: HDMI device that sends the events.
* @port_name: the connector name from which the event occurs. May be NULL
* if there is always only one HDMI connector created by the HDMI device.
* @conn_info: the connector info from which the event occurs (may be NULL)
*
* If a notifier for device @dev and connector @port_name already exists, then
* increase the refcount and return that notifier.
*
* If it doesn't exist, then allocate a new notifier struct and return a
* pointer to that new struct.
*
* Return NULL if the memory could not be allocated.
*/
struct cec_notifier *
cec_notifier_conn_register(struct device *hdmi_dev, const char *port_name,
const struct cec_connector_info *conn_info);
/**
* cec_notifier_conn_unregister - decrease refcount and delete when the
* refcount reaches 0.
* @n: notifier. If NULL, then this function does nothing.
*/
void cec_notifier_conn_unregister(struct cec_notifier *n);
/**
* cec_notifier_cec_adap_register - find or create a new cec_notifier for the
* given device.
* @hdmi_dev: HDMI device that sends the events.
* @port_name: the connector name from which the event occurs. May be NULL
* if there is always only one HDMI connector created by the HDMI device.
* @adap: the cec adapter that registered this notifier.
*
* If a notifier for device @dev and connector @port_name already exists, then
* increase the refcount and return that notifier.
*
* If it doesn't exist, then allocate a new notifier struct and return a
* pointer to that new struct.
*
* Return NULL if the memory could not be allocated.
*/
struct cec_notifier *
cec_notifier_cec_adap_register(struct device *hdmi_dev, const char *port_name,
struct cec_adapter *adap);
/**
* cec_notifier_cec_adap_unregister - decrease refcount and delete when the
* refcount reaches 0.
* @n: notifier. If NULL, then this function does nothing.
* @adap: the cec adapter that registered this notifier.
*/
void cec_notifier_cec_adap_unregister(struct cec_notifier *n,
struct cec_adapter *adap);
/**
* cec_notifier_set_phys_addr - set a new physical address.
* @n: the CEC notifier
* @pa: the CEC physical address
*
* Set a new CEC physical address.
* Does nothing if @n == NULL.
*/
void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa);
/**
* cec_notifier_set_phys_addr_from_edid - set parse the PA from the EDID.
* @n: the CEC notifier
* @edid: the struct edid pointer
*
* Parses the EDID to obtain the new CEC physical address and set it.
* Does nothing if @n == NULL.
*/
void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n,
const struct edid *edid);
Annotation
- Immediate include surface: `linux/err.h`, `media/cec.h`.
- Detected declarations: `struct device`, `struct edid`, `struct cec_adapter`, `struct cec_notifier`, `function cec_notifier_conn_register`, `function cec_notifier_conn_unregister`, `function cec_notifier_cec_adap_unregister`, `function cec_notifier_phys_addr_invalidate`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.