#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/dmi.h>
#include <linux/acpi.h>
#include <linux/thermal.h>
#include <linux/platform_device.h>
#undef START_IN_KERNEL_MODE
#define DRV_VER …
#define ACERHDF_DEFAULT_TEMP_FANON …
#define ACERHDF_DEFAULT_TEMP_FANOFF …
#define ACERHDF_TEMP_CRIT …
#define ACERHDF_FAN_OFF …
#define ACERHDF_FAN_AUTO …
#define ACERHDF_MAX_FANON …
#define ACERHDF_MAX_INTERVAL …
#ifdef START_IN_KERNEL_MODE
static int kernelmode = 1;
#else
static int kernelmode;
#endif
static unsigned int interval = …;
static unsigned int fanon = …;
static unsigned int fanoff = …;
static unsigned int verbose;
static unsigned int list_supported;
static unsigned int fanstate = …;
static char force_bios[16];
static char force_product[16];
static struct thermal_zone_device *thz_dev;
static struct thermal_cooling_device *cl_dev;
static struct platform_device *acerhdf_dev;
module_param(kernelmode, uint, 0);
MODULE_PARM_DESC(…) …;
module_param(fanon, uint, 0600);
MODULE_PARM_DESC(…) …;
module_param(fanoff, uint, 0600);
MODULE_PARM_DESC(…) …;
module_param(verbose, uint, 0600);
MODULE_PARM_DESC(…) …;
module_param(list_supported, uint, 0600);
MODULE_PARM_DESC(…) …;
module_param_string(…);
MODULE_PARM_DESC(…) …;
module_param_string(…);
MODULE_PARM_DESC(…) …;
struct fancmd { … };
struct manualcmd { … };
static const struct manualcmd mcmd = …;
struct bios_settings { … };
struct ctrl_settings { … };
static struct thermal_trip trips[] = …;
static struct ctrl_settings ctrl_cfg __read_mostly;
static const struct bios_settings bios_tbl[] __initconst = …;
static struct thermal_zone_params acerhdf_zone_params = …;
static int acerhdf_get_temp(int *temp)
{ … }
static int acerhdf_get_fanstate(int *state)
{ … }
static void acerhdf_change_fanstate(int state)
{ … }
static void acerhdf_check_param(struct thermal_zone_device *thermal)
{ … }
static int acerhdf_get_ec_temp(struct thermal_zone_device *thermal, int *t)
{ … }
static bool acerhdf_should_bind(struct thermal_zone_device *thermal,
const struct thermal_trip *trip,
struct thermal_cooling_device *cdev,
struct cooling_spec *c)
{ … }
static inline void acerhdf_revert_to_bios_mode(void)
{ … }
static inline void acerhdf_enable_kernelmode(void)
{ … }
static int acerhdf_change_mode(struct thermal_zone_device *thermal,
enum thermal_device_mode mode)
{ … }
static int acerhdf_get_crit_temp(struct thermal_zone_device *thermal,
int *temperature)
{ … }
static struct thermal_zone_device_ops acerhdf_dev_ops = …;
static int acerhdf_get_max_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int acerhdf_get_cur_state(struct thermal_cooling_device *cdev,
unsigned long *state)
{ … }
static int acerhdf_set_cur_state(struct thermal_cooling_device *cdev,
unsigned long state)
{ … }
static const struct thermal_cooling_device_ops acerhdf_cooling_ops = …;
static int acerhdf_suspend(struct device *dev)
{ … }
static int acerhdf_probe(struct platform_device *device)
{ … }
static const struct dev_pm_ops acerhdf_pm_ops = …;
static struct platform_driver acerhdf_driver = …;
static int __init acerhdf_check_hardware(void)
{ … }
static int __init acerhdf_register_platform(void)
{ … }
static void acerhdf_unregister_platform(void)
{ … }
static int __init acerhdf_register_thermal(void)
{ … }
static void acerhdf_unregister_thermal(void)
{ … }
static int __init acerhdf_init(void)
{ … }
static void __exit acerhdf_exit(void)
{ … }
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
module_init(…) …;
module_exit(acerhdf_exit);
static int interval_set_uint(const char *val, const struct kernel_param *kp)
{ … }
static const struct kernel_param_ops interval_ops = …;
module_param_cb(…);
MODULE_PARM_DESC(…) …;