#define pr_format(fmt) …
#include <linux/acpi.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/device/driver.h>
#include <linux/dev_printk.h>
#include <linux/errno.h>
#include <linux/kconfig.h>
#include <linux/kernel.h>
#include <linux/hwmon.h>
#include <linux/kstrtox.h>
#include <linux/math64.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/limits.h>
#include <linux/pm.h>
#include <linux/power_supply.h>
#include <linux/printk.h>
#include <linux/seq_file.h>
#include <linux/sysfs.h>
#include <linux/types.h>
#include <linux/wmi.h>
#include <acpi/battery.h>
#include <linux/unaligned.h>
#define DRIVER_NAME …
#define DELL_DDV_SUPPORTED_VERSION_MIN …
#define DELL_DDV_SUPPORTED_VERSION_MAX …
#define DELL_DDV_GUID …
#define DELL_EPPID_LENGTH …
#define DELL_EPPID_EXT_LENGTH …
static bool force;
module_param_unsafe(force, bool, 0);
MODULE_PARM_DESC(…) …;
enum dell_ddv_method { … };
struct fan_sensor_entry { … } __packed;
struct thermal_sensor_entry { … } __packed;
struct combined_channel_info { … };
struct combined_chip_info { … };
struct dell_wmi_ddv_sensors { … };
struct dell_wmi_ddv_data { … };
static const char * const fan_labels[] = …;
static const char * const fan_dock_labels[] = …;
static int dell_wmi_ddv_query_type(struct wmi_device *wdev, enum dell_ddv_method method, u32 arg,
union acpi_object **result, acpi_object_type type)
{ … }
static int dell_wmi_ddv_query_integer(struct wmi_device *wdev, enum dell_ddv_method method,
u32 arg, u32 *res)
{ … }
static int dell_wmi_ddv_query_buffer(struct wmi_device *wdev, enum dell_ddv_method method,
u32 arg, union acpi_object **result)
{ … }
static int dell_wmi_ddv_query_string(struct wmi_device *wdev, enum dell_ddv_method method,
u32 arg, union acpi_object **result)
{ … }
static int dell_wmi_ddv_update_sensors(struct wmi_device *wdev, enum dell_ddv_method method,
struct dell_wmi_ddv_sensors *sensors, size_t entry_size)
{ … }
static umode_t dell_wmi_ddv_is_visible(const void *drvdata, enum hwmon_sensor_types type, u32 attr,
int channel)
{ … }
static int dell_wmi_ddv_fan_read_channel(struct dell_wmi_ddv_data *data, u32 attr, int channel,
long *val)
{ … }
static int dell_wmi_ddv_temp_read_channel(struct dell_wmi_ddv_data *data, u32 attr, int channel,
long *val)
{ … }
static int dell_wmi_ddv_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
{ … }
static int dell_wmi_ddv_fan_read_string(struct dell_wmi_ddv_data *data, int channel,
const char **str)
{ … }
static int dell_wmi_ddv_temp_read_string(struct dell_wmi_ddv_data *data, int channel,
const char **str)
{ … }
static int dell_wmi_ddv_read_string(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, const char **str)
{ … }
static const struct hwmon_ops dell_wmi_ddv_ops = …;
static struct hwmon_channel_info *dell_wmi_ddv_channel_create(struct device *dev, u64 count,
enum hwmon_sensor_types type,
u32 config)
{ … }
static void dell_wmi_ddv_hwmon_cache_invalidate(struct dell_wmi_ddv_sensors *sensors)
{ … }
static void dell_wmi_ddv_hwmon_cache_destroy(void *data)
{ … }
static struct hwmon_channel_info *dell_wmi_ddv_channel_init(struct wmi_device *wdev,
enum dell_ddv_method method,
struct dell_wmi_ddv_sensors *sensors,
size_t entry_size,
enum hwmon_sensor_types type,
u32 config)
{ … }
static int dell_wmi_ddv_hwmon_add(struct dell_wmi_ddv_data *data)
{ … }
static int dell_wmi_ddv_battery_index(struct acpi_device *acpi_dev, u32 *index)
{ … }
static ssize_t temp_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static ssize_t eppid_show(struct device *dev, struct device_attribute *attr, char *buf)
{ … }
static int dell_wmi_ddv_add_battery(struct power_supply *battery, struct acpi_battery_hook *hook)
{ … }
static int dell_wmi_ddv_remove_battery(struct power_supply *battery, struct acpi_battery_hook *hook)
{ … }
static void dell_wmi_ddv_battery_remove(void *data)
{ … }
static int dell_wmi_ddv_battery_add(struct dell_wmi_ddv_data *data)
{ … }
static int dell_wmi_ddv_buffer_read(struct seq_file *seq, enum dell_ddv_method method)
{ … }
static int dell_wmi_ddv_fan_read(struct seq_file *seq, void *offset)
{ … }
static int dell_wmi_ddv_temp_read(struct seq_file *seq, void *offset)
{ … }
static void dell_wmi_ddv_debugfs_remove(void *data)
{ … }
static void dell_wmi_ddv_debugfs_init(struct wmi_device *wdev)
{ … }
static int dell_wmi_ddv_probe(struct wmi_device *wdev, const void *context)
{ … }
static int dell_wmi_ddv_resume(struct device *dev)
{ … }
static DEFINE_SIMPLE_DEV_PM_OPS(dell_wmi_ddv_dev_pm_ops, NULL, dell_wmi_ddv_resume);
static const struct wmi_device_id dell_wmi_ddv_id_table[] = …;
MODULE_DEVICE_TABLE(wmi, dell_wmi_ddv_id_table);
static struct wmi_driver dell_wmi_ddv_driver = …;
module_wmi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;