| Server IP : 54.233.248.239 / Your IP : 172.28.1.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/modules/6.5.0-1014-aws/build/include/linux/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* wmi.h - ACPI WMI interface
*
* Copyright (c) 2015 Andrew Lutomirski
*/
#ifndef _LINUX_WMI_H
#define _LINUX_WMI_H
#include <linux/device.h>
#include <linux/acpi.h>
#include <linux/mod_devicetable.h>
#include <uapi/linux/wmi.h>
/**
* struct wmi_device - WMI device structure
* @dev: Device associated with this WMI device
* @setable: True for devices implementing the Set Control Method
*
* This represents WMI devices discovered by the WMI driver core.
*/
struct wmi_device {
struct device dev;
/* private: used by the WMI driver core */
bool setable;
};
extern acpi_status wmidev_evaluate_method(struct wmi_device *wdev,
u8 instance, u32 method_id,
const struct acpi_buffer *in,
struct acpi_buffer *out);
extern union acpi_object *wmidev_block_query(struct wmi_device *wdev,
u8 instance);
u8 wmidev_instance_count(struct wmi_device *wdev);
extern int set_required_buffer_size(struct wmi_device *wdev, u64 length);
/**
* struct wmi_driver - WMI driver structure
* @driver: Driver model structure
* @id_table: List of WMI GUIDs supported by this driver
* @no_notify_data: WMI events provide no event data
* @probe: Callback for device binding
* @remove: Callback for device unbinding
* @notify: Callback for receiving WMI events
* @filter_callback: Callback for filtering device IOCTLs
*
* This represents WMI drivers which handle WMI devices.
* @filter_callback is only necessary for drivers which
* want to set up a WMI IOCTL interface.
*/
struct wmi_driver {
struct device_driver driver;
const struct wmi_device_id *id_table;
bool no_notify_data;
int (*probe)(struct wmi_device *wdev, const void *context);
void (*remove)(struct wmi_device *wdev);
void (*notify)(struct wmi_device *device, union acpi_object *data);
long (*filter_callback)(struct wmi_device *wdev, unsigned int cmd,
struct wmi_ioctl_buffer *arg);
};
extern int __must_check __wmi_driver_register(struct wmi_driver *driver,
struct module *owner);
extern void wmi_driver_unregister(struct wmi_driver *driver);
/**
* wmi_driver_register() - Helper macro to register a WMI driver
* @driver: wmi_driver struct
*
* Helper macro for registering a WMI driver. It automatically passes
* THIS_MODULE to the underlying function.
*/
#define wmi_driver_register(driver) __wmi_driver_register((driver), THIS_MODULE)
/**
* module_wmi_driver() - Helper macro to register/unregister a WMI driver
* @__wmi_driver: wmi_driver struct
*
* Helper macro for WMI drivers which do not do anything special in module
* init/exit. This eliminates a lot of boilerplate. Each module may only
* use this macro once, and calling it replaces module_init() and module_exit().
*/
#define module_wmi_driver(__wmi_driver) \
module_driver(__wmi_driver, wmi_driver_register, \
wmi_driver_unregister)
#endif