linux/drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2022-2023 Intel Corporation
 */

/**
 * DOC: MEI_GSC_PROXY Client Driver
 *
 * The mei_gsc_proxy driver acts as a translation layer between
 * proxy user (I915) and ME FW by proxying messages to ME FW
 */

#include <linux/component.h>
#include <linux/mei_cl_bus.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/uuid.h>
#include <drm/drm_connector.h>
#include <drm/intel/i915_component.h>
#include <drm/intel/i915_gsc_proxy_mei_interface.h>

/**
 * mei_gsc_proxy_send - Sends a proxy message to ME FW.
 * @dev: device corresponding to the mei_cl_device
 * @buf: a message buffer to send
 * @size: size of the message
 * Return: bytes sent on Success, <0 on Failure
 */
static int mei_gsc_proxy_send(struct device *dev, const void *buf, size_t size)
{}

/**
 * mei_gsc_proxy_recv - Receives a proxy message from ME FW.
 * @dev: device corresponding to the mei_cl_device
 * @buf: a message buffer to contain the received message
 * @size: size of the buffer
 * Return: bytes received on Success, <0 on Failure
 */
static int mei_gsc_proxy_recv(struct device *dev, void *buf, size_t size)
{}

static const struct i915_gsc_proxy_component_ops mei_gsc_proxy_ops =;

static int mei_component_master_bind(struct device *dev)
{}

static void mei_component_master_unbind(struct device *dev)
{}

static const struct component_master_ops mei_component_master_ops =;

/**
 * mei_gsc_proxy_component_match - compare function for matching mei.
 *
 *    The function checks if the device is pci device and
 *    Intel VGA adapter, the subcomponent is SW Proxy
 *    and the VGA is on the bus 0 reserved for built-in devices
 *    to reject discrete GFX.
 *
 * @dev: master device
 * @subcomponent: subcomponent to match (I915_COMPONENT_SWPROXY)
 * @data: compare data (mei pci parent)
 *
 * Return:
 * * 1 - if components match
 * * 0 - otherwise
 */
static int mei_gsc_proxy_component_match(struct device *dev, int subcomponent,
					 void *data)
{}

static int mei_gsc_proxy_probe(struct mei_cl_device *cldev,
			       const struct mei_cl_device_id *id)
{}

static void mei_gsc_proxy_remove(struct mei_cl_device *cldev)
{}

#define MEI_UUID_GSC_PROXY

static struct mei_cl_device_id mei_gsc_proxy_tbl[] =;
MODULE_DEVICE_TABLE(mei, mei_gsc_proxy_tbl);

static struct mei_cl_driver mei_gsc_proxy_driver =;

module_mei_cl_driver();

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();