#define pr_fmt(fmt) …
#include <linux/acpi.h>
#include <linux/bits.h>
#include <linux/build_bug.h>
#include <linux/device.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/uuid.h>
#include <linux/wmi.h>
#include <linux/fs.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static LIST_HEAD(wmi_block_list);
struct guid_block { … } __packed;
static_assert(…);
static_assert(…);
static_assert(…);
enum { … };
struct wmi_block { … };
#define ACPI_WMI_EXPENSIVE …
#define ACPI_WMI_METHOD …
#define ACPI_WMI_STRING …
#define ACPI_WMI_EVENT …
static const struct acpi_device_id wmi_device_ids[] = …;
MODULE_DEVICE_TABLE(acpi, wmi_device_ids);
#define dev_to_wblock(__dev) …
#define dev_to_wdev(__dev) …
static bool guid_parse_and_compare(const char *string, const guid_t *guid)
{ … }
static const void *find_guid_context(struct wmi_block *wblock,
struct wmi_driver *wdriver)
{ … }
static acpi_status wmi_method_enable(struct wmi_block *wblock, bool enable)
{ … }
#define WMI_ACPI_METHOD_NAME_SIZE …
static inline void get_acpi_method_name(const struct wmi_block *wblock,
const char method,
char buffer[static WMI_ACPI_METHOD_NAME_SIZE])
{ … }
static inline acpi_object_type get_param_acpi_type(const struct wmi_block *wblock)
{ … }
static int wmidev_match_guid(struct device *dev, const void *data)
{ … }
static const struct bus_type wmi_bus_type;
static struct wmi_device *wmi_find_device_by_guid(const char *guid_string)
{ … }
static void wmi_device_put(struct wmi_device *wdev)
{ … }
int wmi_instance_count(const char *guid_string)
{ … }
EXPORT_SYMBOL_GPL(…);
u8 wmidev_instance_count(struct wmi_device *wdev)
{ … }
EXPORT_SYMBOL_GPL(…);
acpi_status wmi_evaluate_method(const char *guid_string, u8 instance, u32 method_id,
const struct acpi_buffer *in, struct acpi_buffer *out)
{ … }
EXPORT_SYMBOL_GPL(…);
acpi_status wmidev_evaluate_method(struct wmi_device *wdev, u8 instance, u32 method_id,
const struct acpi_buffer *in, struct acpi_buffer *out)
{ … }
EXPORT_SYMBOL_GPL(…);
static acpi_status __query_block(struct wmi_block *wblock, u8 instance,
struct acpi_buffer *out)
{ … }
acpi_status wmi_query_block(const char *guid_string, u8 instance,
struct acpi_buffer *out)
{ … }
EXPORT_SYMBOL_GPL(…);
union acpi_object *wmidev_block_query(struct wmi_device *wdev, u8 instance)
{ … }
EXPORT_SYMBOL_GPL(…);
acpi_status wmi_set_block(const char *guid_string, u8 instance, const struct acpi_buffer *in)
{ … }
EXPORT_SYMBOL_GPL(…);
acpi_status wmidev_block_set(struct wmi_device *wdev, u8 instance, const struct acpi_buffer *in)
{ … }
EXPORT_SYMBOL_GPL(…);
acpi_status wmi_install_notify_handler(const char *guid,
wmi_notify_handler handler,
void *data)
{ … }
EXPORT_SYMBOL_GPL(…);
acpi_status wmi_remove_notify_handler(const char *guid)
{ … }
EXPORT_SYMBOL_GPL(…);
bool wmi_has_guid(const char *guid_string)
{ … }
EXPORT_SYMBOL_GPL(…);
char *wmi_get_acpi_device_uid(const char *guid_string)
{ … }
EXPORT_SYMBOL_GPL(…);
#define drv_to_wdrv(__drv) …
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(modalias);
static ssize_t guid_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(guid);
static ssize_t instance_count_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(instance_count);
static ssize_t expensive_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(expensive);
static ssize_t driver_override_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t driver_override_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(driver_override);
static struct attribute *wmi_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static ssize_t notify_id_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(notify_id);
static struct attribute *wmi_event_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static ssize_t object_id_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(object_id);
static ssize_t setable_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static DEVICE_ATTR_RO(setable);
static struct attribute *wmi_data_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static struct attribute *wmi_method_attrs[] = …;
ATTRIBUTE_GROUPS(…);
static int wmi_dev_uevent(const struct device *dev, struct kobj_uevent_env *env)
{ … }
static void wmi_dev_release(struct device *dev)
{ … }
static int wmi_dev_match(struct device *dev, const struct device_driver *driver)
{ … }
static int wmi_dev_probe(struct device *dev)
{ … }
static void wmi_dev_remove(struct device *dev)
{ … }
static struct class wmi_bus_class = …;
static const struct bus_type wmi_bus_type = …;
static const struct device_type wmi_type_event = …;
static const struct device_type wmi_type_method = …;
static const struct device_type wmi_type_data = …;
static int guid_count(const guid_t *guid)
{ … }
static int wmi_create_device(struct device *wmi_bus_dev,
struct wmi_block *wblock,
struct acpi_device *device)
{ … }
static int wmi_add_device(struct platform_device *pdev, struct wmi_device *wdev)
{ … }
static int parse_wdg(struct device *wmi_bus_dev, struct platform_device *pdev)
{ … }
static int wmi_get_notify_data(struct wmi_block *wblock, union acpi_object **obj)
{ … }
static void wmi_notify_driver(struct wmi_block *wblock, union acpi_object *obj)
{ … }
static int wmi_notify_device(struct device *dev, void *data)
{ … }
static void acpi_wmi_notify_handler(acpi_handle handle, u32 event, void *context)
{ … }
static int wmi_remove_device(struct device *dev, void *data)
{ … }
static void acpi_wmi_remove(struct platform_device *device)
{ … }
static void acpi_wmi_remove_notify_handler(void *data)
{ … }
static void acpi_wmi_remove_bus_device(void *data)
{ … }
static int acpi_wmi_probe(struct platform_device *device)
{ … }
int __must_check __wmi_driver_register(struct wmi_driver *driver,
struct module *owner)
{ … }
EXPORT_SYMBOL(…);
void wmi_driver_unregister(struct wmi_driver *driver)
{ … }
EXPORT_SYMBOL(…);
static struct platform_driver acpi_wmi_driver = …;
static int __init acpi_wmi_init(void)
{ … }
static void __exit acpi_wmi_exit(void)
{ … }
subsys_initcall_sync(acpi_wmi_init);
module_exit(acpi_wmi_exit);