#include <linux/clk-provider.h>
#include <linux/debugfs.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/mailbox_client.h>
#include <linux/module.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/thermal.h>
#include <linux/slab.h>
#include <linux/soc/qcom/qcom_aoss.h>
#define CREATE_TRACE_POINTS
#include "trace-aoss.h"
#define QMP_DESC_MAGIC …
#define QMP_DESC_VERSION …
#define QMP_DESC_FEATURES …
#define QMP_DESC_UCORE_LINK_STATE …
#define QMP_DESC_UCORE_LINK_STATE_ACK …
#define QMP_DESC_UCORE_CH_STATE …
#define QMP_DESC_UCORE_CH_STATE_ACK …
#define QMP_DESC_UCORE_MBOX_SIZE …
#define QMP_DESC_UCORE_MBOX_OFFSET …
#define QMP_DESC_MCORE_LINK_STATE …
#define QMP_DESC_MCORE_LINK_STATE_ACK …
#define QMP_DESC_MCORE_CH_STATE …
#define QMP_DESC_MCORE_CH_STATE_ACK …
#define QMP_DESC_MCORE_MBOX_SIZE …
#define QMP_DESC_MCORE_MBOX_OFFSET …
#define QMP_STATE_UP …
#define QMP_STATE_DOWN …
#define QMP_MAGIC …
#define QMP_VERSION …
#define QMP_MSG_LEN …
#define QMP_NUM_COOLING_RESOURCES …
#define QMP_DEBUGFS_FILES …
static bool qmp_cdev_max_state = …;
struct qmp_cooling_device { … };
struct qmp { … };
static void qmp_kick(struct qmp *qmp)
{ … }
static bool qmp_magic_valid(struct qmp *qmp)
{ … }
static bool qmp_link_acked(struct qmp *qmp)
{ … }
static bool qmp_mcore_channel_acked(struct qmp *qmp)
{ … }
static bool qmp_ucore_channel_up(struct qmp *qmp)
{ … }
static int qmp_open(struct qmp *qmp)
{ … }
static void qmp_close(struct qmp *qmp)
{ … }
static irqreturn_t qmp_intr(int irq, void *data)
{ … }
static bool qmp_message_empty(struct qmp *qmp)
{ … }
int __printf(2, 3) qmp_send(struct qmp *qmp, const char *fmt, ...)
{ … }
EXPORT_SYMBOL_GPL(…);
static int qmp_qdss_clk_prepare(struct clk_hw *hw)
{ … }
static void qmp_qdss_clk_unprepare(struct clk_hw *hw)
{ … }
static const struct clk_ops qmp_qdss_clk_ops = …;
static int qmp_qdss_clk_add(struct qmp *qmp)
{ … }
static void qmp_qdss_clk_remove(struct qmp *qmp)
{ … }
static int qmp_cdev_get_max_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int qmp_cdev_get_cur_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int qmp_cdev_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state)
{ … }
static const struct thermal_cooling_device_ops qmp_cooling_device_ops = …;
static int qmp_cooling_device_add(struct qmp *qmp,
struct qmp_cooling_device *qmp_cdev,
struct device_node *node)
{ … }
static int qmp_cooling_devices_register(struct qmp *qmp)
{ … }
static void qmp_cooling_devices_remove(struct qmp *qmp)
{ … }
struct qmp *qmp_get(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void qmp_put(struct qmp *qmp)
{ … }
EXPORT_SYMBOL_GPL(…);
struct qmp_debugfs_entry { … };
static const struct qmp_debugfs_entry qmp_debugfs_entries[QMP_DEBUGFS_FILES] = …;
static ssize_t qmp_debugfs_write(struct file *file, const char __user *user_buf,
size_t count, loff_t *pos)
{ … }
static const struct file_operations qmp_debugfs_fops = …;
static void qmp_debugfs_create(struct qmp *qmp)
{ … }
static int qmp_probe(struct platform_device *pdev)
{ … }
static void qmp_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id qmp_dt_match[] = …;
MODULE_DEVICE_TABLE(of, qmp_dt_match);
static struct platform_driver qmp_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;