summaryrefslogtreecommitdiff
path: root/include/linux/wmi.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2026-04-27 11:26:49 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2026-04-27 11:26:49 +0300
commit0fc8f6200d2313278fbf4539bbab74677c685531 (patch)
tree35f839d8e2244e0575cbdf60e8505048b5424885 /include/linux/wmi.h
parentd13e855ee923c2ae78307bf6c354305f1406b9e2 (diff)
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
downloadlinux-0fc8f6200d2313278fbf4539bbab74677c685531.tar.xz
Merge drm/drm-fixes into drm-misc-fixes
Getting fixes and updates from v7.1-rc1. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'include/linux/wmi.h')
-rw-r--r--include/linux/wmi.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/wmi.h b/include/linux/wmi.h
index 75cb0c7cfe57..d723e4b1cafb 100644
--- a/include/linux/wmi.h
+++ b/include/linux/wmi.h
@@ -18,16 +18,12 @@
* struct wmi_device - WMI device structure
* @dev: Device associated with this WMI device
* @setable: True for devices implementing the Set Control Method
- * @driver_override: Driver name to force a match; do not set directly,
- * because core frees it; use driver_set_override() to
- * set or clear it.
*
* This represents WMI devices discovered by the WMI driver core.
*/
struct wmi_device {
struct device dev;
bool setable;
- const char *driver_override;
};
/**
@@ -68,9 +64,13 @@ ssize_t wmi_string_from_utf8s(struct wmi_string *str, size_t max_chars, const u8
size_t src_length);
int wmidev_invoke_method(struct wmi_device *wdev, u8 instance, u32 method_id,
- const struct wmi_buffer *in, struct wmi_buffer *out);
+ const struct wmi_buffer *in, struct wmi_buffer *out, size_t min_size);
-int wmidev_query_block(struct wmi_device *wdev, u8 instance, struct wmi_buffer *out);
+int wmidev_invoke_procedure(struct wmi_device *wdev, u8 instance, u32 method_id,
+ const struct wmi_buffer *in);
+
+int wmidev_query_block(struct wmi_device *wdev, u8 instance, struct wmi_buffer *out,
+ size_t min_size);
int wmidev_set_block(struct wmi_device *wdev, u8 instance, const struct wmi_buffer *in);
@@ -87,7 +87,7 @@ u8 wmidev_instance_count(struct wmi_device *wdev);
* struct wmi_driver - WMI driver structure
* @driver: Driver model structure
* @id_table: List of WMI GUIDs supported by this driver
- * @no_notify_data: Driver supports WMI events which provide no event data
+ * @min_event_size: Minimum event payload size supported by this driver
* @no_singleton: Driver can be instantiated multiple times
* @probe: Callback for device binding
* @remove: Callback for device unbinding
@@ -97,11 +97,14 @@ u8 wmidev_instance_count(struct wmi_device *wdev);
*
* This represents WMI drivers which handle WMI devices. The data inside the buffer
* passed to the @notify_new callback is guaranteed to be aligned on a 8-byte boundary.
+ * The minimum supported size for said buffer can be specified using @min_event_size.
+ * WMI drivers that still use the deprecated @notify callback can still set @min_event_size
+ * to 0 in order to signal that they support WMI events which provide no event data.
*/
struct wmi_driver {
struct device_driver driver;
const struct wmi_device_id *id_table;
- bool no_notify_data;
+ size_t min_event_size;
bool no_singleton;
int (*probe)(struct wmi_device *wdev, const void *context);