linux/drivers/platform/x86/intel/ishtp_eclite.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Intel ECLite opregion driver for talking to ECLite firmware running on
 * Intel Integrated Sensor Hub (ISH) using ISH Transport Protocol (ISHTP)
 *
 * Copyright (c) 2021, Intel Corporation.
 */

#include <linux/acpi.h>
#include <linux/bitops.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/intel-ish-client-if.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/suspend.h>
#include <linux/types.h>
#include <linux/uuid.h>
#include <linux/uaccess.h>

#define ECLITE_DATA_OPREGION_ID
#define ECLITE_CMD_OPREGION_ID

#define ECL_MSG_DATA
#define ECL_MSG_EVENT

#define ECL_ISH_READ
#define ECL_ISH_WRITE
#define ECL_ISH_HEADER_VERSION

#define ECL_CL_RX_RING_SIZE
#define ECL_CL_TX_RING_SIZE

#define ECL_DATA_OPR_BUFLEN
#define ECL_EVENTS_NOTIFY

#define cmd_opr_offsetof(element)
#define cl_data_to_dev(opr_dev)

#ifndef BITS_TO_BYTES
#define BITS_TO_BYTES
#endif

struct opregion_cmd {};

struct opregion_data {};

struct opregion_context {};

struct ecl_message_header {};

struct ecl_message {};

struct ishtp_opregion_dev {};

/* eclite ishtp client UUID: 6a19cc4b-d760-4de3-b14d-f25ebd0fbcd9 */
static const struct ishtp_device_id ecl_ishtp_id_table[] =;
MODULE_DEVICE_TABLE(ishtp, ecl_ishtp_id_table);

/* ACPI DSM UUID: 91d936a7-1f01-49c6-a6b4-72f00ad8d8a5 */
static const guid_t ecl_acpi_guid =;

/**
 * ecl_ish_cl_read() - Read data from eclite FW
 *
 * @opr_dev:  pointer to opregion device
 *
 * This function issues a read request to eclite FW and waits until it
 * receives a response. When response is received the read data is copied to
 * opregion buffer.
 */
static int ecl_ish_cl_read(struct ishtp_opregion_dev *opr_dev)
{}

/**
 * ecl_ish_cl_write() - This function writes data to eclite FW.
 *
 * @opr_dev:  pointer to opregion device
 *
 * This function writes data to eclite FW.
 */
static int ecl_ish_cl_write(struct ishtp_opregion_dev *opr_dev)
{}

static acpi_status
ecl_opregion_cmd_handler(u32 function, acpi_physical_address address,
			 u32 bits, u64 *value64,
			 void *handler_context, void *region_context)
{}

static acpi_status
ecl_opregion_data_handler(u32 function, acpi_physical_address address,
			  u32 bits, u64 *value64,
			  void *handler_context, void *region_context)
{}

static int acpi_find_eclite_device(struct ishtp_opregion_dev *opr_dev)
{}

static int acpi_opregion_init(struct ishtp_opregion_dev *opr_dev)
{}

static void acpi_opregion_deinit(struct ishtp_opregion_dev *opr_dev)
{}

static void ecl_acpi_invoke_dsm(struct work_struct *work)
{}

static void ecl_ish_process_rx_data(struct ishtp_opregion_dev *opr_dev)
{}

static void ecl_ish_process_rx_event(struct ishtp_opregion_dev *opr_dev)
{}

static int ecl_ish_cl_enable_events(struct ishtp_opregion_dev *opr_dev,
				    bool config_enable)
{}

static void ecl_ishtp_cl_event_cb(struct ishtp_cl_device *cl_device)
{}

static int ecl_ishtp_cl_init(struct ishtp_cl *ecl_ishtp_cl)
{}

static void ecl_ishtp_cl_deinit(struct ishtp_cl *ecl_ishtp_cl)
{}

static void ecl_ishtp_cl_reset_handler(struct work_struct *work)
{}

static int ecl_ishtp_cl_probe(struct ishtp_cl_device *cl_device)
{}

static void ecl_ishtp_cl_remove(struct ishtp_cl_device *cl_device)
{}

static int ecl_ishtp_cl_reset(struct ishtp_cl_device *cl_device)
{}

static int ecl_ishtp_cl_suspend(struct device *device)
{}

static int ecl_ishtp_cl_resume(struct device *device)
{}

static const struct dev_pm_ops ecl_ishtp_pm_ops =;

static struct ishtp_cl_driver ecl_ishtp_cl_driver =;

static int __init ecl_ishtp_init(void)
{}

static void __exit ecl_ishtp_exit(void)
{}

late_initcall(ecl_ishtp_init);
module_exit(ecl_ishtp_exit);

MODULE_DESCRIPTION();
MODULE_AUTHOR();

MODULE_LICENSE();