linux/drivers/platform/x86/inspur_platform_profile.c

// SPDX-License-Identifier: GPL-2.0
/*
 *  Inspur WMI Platform Profile
 *
 *  Copyright (C) 2018	      Ai Chao <[email protected]>
 */

#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/platform_profile.h>
#include <linux/wmi.h>

#define WMI_INSPUR_POWERMODE_BIOS_GUID

enum inspur_wmi_method_ids {};

/*
 * Power Mode:
 *           0x0: Balance Mode
 *           0x1: Performance Mode
 *           0x2: Power Saver Mode
 */
enum inspur_tmp_profile {};

struct inspur_wmi_priv {};

static int inspur_wmi_perform_query(struct wmi_device *wdev,
				    enum inspur_wmi_method_ids query_id,
				    void *buffer, size_t insize,
				    size_t outsize)
{}

/*
 * Set Power Mode to EC RAM. If Power Mode value greater than 0x3,
 * return error
 * Method ID: 0x3
 * Arg: 4 Bytes
 * Byte [0]: Power Mode:
 *         0x0: Balance Mode
 *         0x1: Performance Mode
 *         0x2: Power Saver Mode
 * Return Value: 4 Bytes
 * Byte [0]: Return Code
 *         0x0: No Error
 *         0x1: Error
 */
static int inspur_platform_profile_set(struct platform_profile_handler *pprof,
				       enum platform_profile_option profile)
{}

/*
 * Get Power Mode from EC RAM, If Power Mode value greater than 0x3,
 * return error
 * Method ID: 0x2
 * Return Value: 4 Bytes
 * Byte [0]: Return Code
 *         0x0: No Error
 *         0x1: Error
 * Byte [1]: Power Mode
 *         0x0: Balance Mode
 *         0x1: Performance Mode
 *         0x2: Power Saver Mode
 */
static int inspur_platform_profile_get(struct platform_profile_handler *pprof,
				       enum platform_profile_option *profile)
{}

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

static void inspur_wmi_remove(struct wmi_device *wdev)
{}

static const struct wmi_device_id inspur_wmi_id_table[] =;

MODULE_DEVICE_TABLE(wmi, inspur_wmi_id_table);

static struct wmi_driver inspur_wmi_driver =;

module_wmi_driver();

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