2 * User API methods for ACPI-WMI mapping driver
4 * Copyright (C) 2017 Dell, Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #ifndef _UAPI_LINUX_WMI_H
11 #define _UAPI_LINUX_WMI_H
13 #include <linux/ioctl.h>
14 #include <linux/types.h>
16 /* WMI bus will filter all WMI vendor driver requests through this IOC */
19 /* All ioctl requests through WMI should declare their size followed by
20 * relevant data objects
22 struct wmi_ioctl_buffer
{
27 /* This structure may be modified by the firmware when we enter
28 * system management mode through SMM, hence the volatiles
30 struct calling_interface_buffer
{
33 volatile __u32 input
[4];
34 volatile __u32 output
[4];
37 struct dell_wmi_extensions
{
43 struct dell_wmi_smbios_buffer
{
45 struct calling_interface_buffer std
;
46 struct dell_wmi_extensions ext
;
49 /* Whitelisted smbios class/select commands */
50 #define CLASS_TOKEN_READ 0
51 #define CLASS_TOKEN_WRITE 1
52 #define SELECT_TOKEN_STD 0
53 #define SELECT_TOKEN_BAT 1
54 #define SELECT_TOKEN_AC 2
55 #define CLASS_FLASH_INTERFACE 7
56 #define SELECT_FLASH_INTERFACE 3
57 #define CLASS_ADMIN_PROP 10
58 #define SELECT_ADMIN_PROP 3
60 #define SELECT_RFKILL 11
61 #define SELECT_APP_REGISTRATION 3
62 #define SELECT_DOCK 22
64 /* whitelisted tokens */
65 #define CAPSULE_EN_TOKEN 0x0461
66 #define CAPSULE_DIS_TOKEN 0x0462
67 #define WSMT_EN_TOKEN 0x04EC
68 #define WSMT_DIS_TOKEN 0x04ED
70 /* Dell SMBIOS calling IOCTL command used by dell-smbios-wmi */
71 #define DELL_WMI_SMBIOS_CMD _IOWR(WMI_IOC, 0, struct dell_wmi_smbios_buffer)