linux/drivers/misc/mei/bus-fixup.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2013-2023, Intel Corporation. All rights reserved.
 * Intel Management Engine Interface (Intel MEI) Linux driver
 */

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/device.h>
#include <linux/slab.h>

#include <linux/mei.h>
#include <linux/mei_cl_bus.h>

#include "mei_dev.h"
#include "client.h"
#include "mkhi.h"

#define MEI_UUID_NFC_INFO

static const uuid_le mei_nfc_info_guid =;

#define MEI_UUID_NFC_HCI

#define MEI_UUID_WD

#define MEI_UUID_MKHIF_FIX

#define MEI_UUID_IGSC_MKHI

#define MEI_UUID_IGSC_MKHI_FIX

#define MEI_UUID_HDCP

#define MEI_UUID_PAVP

#define MEI_UUID_ANY

/**
 * number_of_connections - determine whether an client be on the bus
 *    according number of connections
 *    We support only clients:
 *       1. with single connection
 *       2. and fixed clients (max_number_of_connections == 0)
 *
 * @cldev: me clients device
 */
static void number_of_connections(struct mei_cl_device *cldev)
{}

/**
 * blacklist - blacklist a client from the bus
 *
 * @cldev: me clients device
 */
static void blacklist(struct mei_cl_device *cldev)
{}

/**
 * whitelist - forcefully whitelist client
 *
 * @cldev: me clients device
 */
static void whitelist(struct mei_cl_device *cldev)
{}

#define MKHI_SEND_MAX_TIMEOUT_MSEC

#define OSTYPE_LINUX
struct mei_os_ver {} __packed;

struct mkhi_fw_ver_block {} __packed;

struct mkhi_fw_ver {} __packed;

#define MKHI_OSVER_BUF_LEN
static int mei_osver(struct mei_cl_device *cldev)
{}

#define MKHI_FWVER_BUF_LEN
#define MKHI_FWVER_LEN(__num)
static int mei_fwver(struct mei_cl_device *cldev)
{}

#define GFX_MEMORY_READY_TIMEOUT

static int mei_gfx_memory_ready(struct mei_cl_device *cldev)
{}

static void mei_mkhi_fix(struct mei_cl_device *cldev)
{}

static void mei_gsc_mkhi_ver(struct mei_cl_device *cldev)
{}

static void mei_gsc_mkhi_fix_ver(struct mei_cl_device *cldev)
{}

/**
 * mei_wd - wd client on the bus, change protocol version
 *   as the API has changed.
 *
 * @cldev: me clients device
 */
#if IS_ENABLED(CONFIG_INTEL_MEI_ME)
#include <linux/pci.h>
#include "hw-me-regs.h"
static void mei_wd(struct mei_cl_device *cldev)
{}
#else
static inline void mei_wd(struct mei_cl_device *cldev) {}
#endif /* CONFIG_INTEL_MEI_ME */

struct mei_nfc_cmd {} __packed;

struct mei_nfc_reply {} __packed;

struct mei_nfc_if_version {} __packed;


#define MEI_NFC_CMD_MAINTENANCE
#define MEI_NFC_SUBCMD_IF_VERSION

/* Vendors */
#define MEI_NFC_VENDOR_INSIDE
#define MEI_NFC_VENDOR_NXP

/* Radio types */
#define MEI_NFC_VENDOR_INSIDE_UREAD
#define MEI_NFC_VENDOR_NXP_PN544

/**
 * mei_nfc_if_version - get NFC interface version
 *
 * @cl: host client (nfc info)
 * @ver: NFC interface version to be filled in
 *
 * Return: 0 on success; < 0 otherwise
 */
static int mei_nfc_if_version(struct mei_cl *cl,
			      struct mei_nfc_if_version *ver)
{}

/**
 * mei_nfc_radio_name - derive nfc radio name from the interface version
 *
 * @ver: NFC radio version
 *
 * Return: radio name string
 */
static const char *mei_nfc_radio_name(struct mei_nfc_if_version *ver)
{}

/**
 * mei_nfc - The nfc fixup function. The function retrieves nfc radio
 *    name and set is as device attribute so we can load
 *    the proper device driver for it
 *
 * @cldev: me client device (nfc)
 */
static void mei_nfc(struct mei_cl_device *cldev)
{}

/**
 * vt_support - enable on bus clients with vtag support
 *
 * @cldev: me clients device
 */
static void vt_support(struct mei_cl_device *cldev)
{}

/**
 * pxp_is_ready - enable bus client if pxp is ready
 *
 * @cldev: me clients device
 */
static void pxp_is_ready(struct mei_cl_device *cldev)
{}

#define MEI_FIXUP(_uuid, _hook)

static struct mei_fixup {} mei_fixups[] =;

/**
 * mei_cl_bus_dev_fixup - run fixup handlers
 *
 * @cldev: me client device
 */
void mei_cl_bus_dev_fixup(struct mei_cl_device *cldev)
{}