linux/drivers/platform/x86/msi-wmi-platform.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Linux driver for WMI platform features on MSI notebooks.
 *
 * Copyright (C) 2024 Armin Wolf <[email protected]>
 */

#define pr_format(fmt)

#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/bitfield.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/device/driver.h>
#include <linux/errno.h>
#include <linux/hwmon.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/rwsem.h>
#include <linux/types.h>
#include <linux/wmi.h>

#include <asm/unaligned.h>

#define DRIVER_NAME

#define MSI_PLATFORM_GUID

#define MSI_WMI_PLATFORM_INTERFACE_VERSION

#define MSI_PLATFORM_WMI_MAJOR_OFFSET
#define MSI_PLATFORM_WMI_MINOR_OFFSET

#define MSI_PLATFORM_EC_FLAGS_OFFSET
#define MSI_PLATFORM_EC_MINOR_MASK
#define MSI_PLATFORM_EC_MAJOR_MASK
#define MSI_PLATFORM_EC_CHANGED_PAGE
#define MSI_PLATFORM_EC_IS_TIGERLAKE
#define MSI_PLATFORM_EC_VERSION_OFFSET

static bool force;
module_param_unsafe(force, bool, 0);
MODULE_PARM_DESC();

enum msi_wmi_platform_method {};

struct msi_wmi_platform_debugfs_data {};

static const char * const msi_wmi_platform_debugfs_names[] =;

static int msi_wmi_platform_parse_buffer(union acpi_object *obj, u8 *output, size_t length)
{}

static int msi_wmi_platform_query(struct wmi_device *wdev, enum msi_wmi_platform_method method,
				  u8 *input, size_t input_length, u8 *output, size_t output_length)
{}

static umode_t msi_wmi_platform_is_visible(const void *drvdata, enum hwmon_sensor_types type,
					   u32 attr, int channel)
{}

static int msi_wmi_platform_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
				 int channel, long *val)
{}

static const struct hwmon_ops msi_wmi_platform_ops =;

static const struct hwmon_channel_info * const msi_wmi_platform_info[] =;

static const struct hwmon_chip_info msi_wmi_platform_chip_info =;

static ssize_t msi_wmi_platform_write(struct file *fp, const char __user *input, size_t length,
				      loff_t *offset)
{}

static int msi_wmi_platform_show(struct seq_file *seq, void *p)
{}

static int msi_wmi_platform_open(struct inode *inode, struct file *fp)
{}

static const struct file_operations msi_wmi_platform_debugfs_fops =;

static void msi_wmi_platform_debugfs_remove(void *data)
{}

static void msi_wmi_platform_debugfs_add(struct wmi_device *wdev, struct dentry *dir,
					 const char *name, enum msi_wmi_platform_method method)
{}

static void msi_wmi_platform_debugfs_init(struct wmi_device *wdev)
{}

static int msi_wmi_platform_hwmon_init(struct wmi_device *wdev)
{}

static int msi_wmi_platform_ec_init(struct wmi_device *wdev)
{}

static int msi_wmi_platform_init(struct wmi_device *wdev)
{}

static int msi_wmi_platform_probe(struct wmi_device *wdev, const void *context)
{}

static const struct wmi_device_id msi_wmi_platform_id_table[] =;
MODULE_DEVICE_TABLE(wmi, msi_wmi_platform_id_table);

static struct wmi_driver msi_wmi_platform_driver =;
module_wmi_driver();

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