1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * wmi.h - ACPI WMI interface
5 * Copyright (c) 2015 Andrew Lutomirski
11 #include <linux/device.h>
12 #include <linux/acpi.h>
13 #include <linux/mod_devicetable.h>
14 #include <uapi/linux/wmi.h>
19 /* True for data blocks implementing the Set Control Method */
23 /* evaluate the ACPI method associated with this device */
24 extern acpi_status wmidev_evaluate_method(struct wmi_device *wdev,
25 u8 instance, u32 method_id,
26 const struct acpi_buffer *in,
27 struct acpi_buffer *out);
29 /* Caller must kfree the result. */
30 extern union acpi_object *wmidev_block_query(struct wmi_device *wdev,
33 extern int set_required_buffer_size(struct wmi_device *wdev, u64 length);
36 struct device_driver driver;
37 const struct wmi_device_id *id_table;
39 int (*probe)(struct wmi_device *wdev, const void *context);
40 void (*remove)(struct wmi_device *wdev);
41 void (*notify)(struct wmi_device *device, union acpi_object *data);
42 long (*filter_callback)(struct wmi_device *wdev, unsigned int cmd,
43 struct wmi_ioctl_buffer *arg);
46 extern int __must_check __wmi_driver_register(struct wmi_driver *driver,
47 struct module *owner);
48 extern void wmi_driver_unregister(struct wmi_driver *driver);
49 #define wmi_driver_register(driver) __wmi_driver_register((driver), THIS_MODULE)
51 #define module_wmi_driver(__wmi_driver) \
52 module_driver(__wmi_driver, wmi_driver_register, \
53 wmi_driver_unregister)