linux/drivers/media/cec/core/cec-notifier.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * cec-notifier.c - notify CEC drivers of physical address changes
 *
 * Copyright 2016 Russell King.
 * Copyright 2016-2017 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
 */

#include <linux/export.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/list.h>
#include <linux/kref.h>
#include <linux/of_platform.h>

#include <media/cec.h>
#include <media/cec-notifier.h>
#include <drm/drm_edid.h>

struct cec_notifier {};

static LIST_HEAD(cec_notifiers);
static DEFINE_MUTEX(cec_notifiers_lock);

/**
 * cec_notifier_get_conn - find or create a new cec_notifier for the given
 * device and connector tuple.
 * @hdmi_dev: device that sends the events.
 * @port_name: the connector name from which the event occurs
 *
 * If a notifier for device @dev 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.
 */
static struct cec_notifier *
cec_notifier_get_conn(struct device *hdmi_dev, const char *port_name)
{}

static void cec_notifier_release(struct kref *kref)
{}

static void cec_notifier_put(struct cec_notifier *n)
{}

struct cec_notifier *
cec_notifier_conn_register(struct device *hdmi_dev, const char *port_name,
			   const struct cec_connector_info *conn_info)
{}
EXPORT_SYMBOL_GPL();

void cec_notifier_conn_unregister(struct cec_notifier *n)
{}
EXPORT_SYMBOL_GPL();

struct cec_notifier *
cec_notifier_cec_adap_register(struct device *hdmi_dev, const char *port_name,
			       struct cec_adapter *adap)
{}
EXPORT_SYMBOL_GPL();

void cec_notifier_cec_adap_unregister(struct cec_notifier *n,
				      struct cec_adapter *adap)
{}
EXPORT_SYMBOL_GPL();

void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa)
{}
EXPORT_SYMBOL_GPL();

/*
 * Note: In the drm subsystem, prefer calling (if possible):
 *
 * cec_notifier_set_phys_addr(n, connector->display_info.source_physical_address);
 */
void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n,
					  const struct edid *edid)
{}
EXPORT_SYMBOL_GPL();

struct device *cec_notifier_parse_hdmi_phandle(struct device *dev)
{}
EXPORT_SYMBOL_GPL();