#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/dmi.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/jiffies.h>
#include <linux/kmod.h>
#include <linux/reboot.h>
#include <linux/device.h>
#include <linux/thermal.h>
#include <linux/acpi.h>
#include <linux/workqueue.h>
#include <linux/uaccess.h>
#include <linux/units.h>
#include "internal.h"
#define ACPI_THERMAL_CLASS …
#define ACPI_THERMAL_DEVICE_NAME …
#define ACPI_THERMAL_NOTIFY_TEMPERATURE …
#define ACPI_THERMAL_NOTIFY_THRESHOLDS …
#define ACPI_THERMAL_NOTIFY_DEVICES …
#define ACPI_THERMAL_NOTIFY_CRITICAL …
#define ACPI_THERMAL_NOTIFY_HOT …
#define ACPI_THERMAL_MODE_ACTIVE …
#define ACPI_THERMAL_MAX_ACTIVE …
#define ACPI_THERMAL_MAX_LIMIT_STR_LEN …
#define ACPI_THERMAL_TRIP_PASSIVE …
#define ACPI_THERMAL_MAX_NR_TRIPS …
#define ACPI_THERMAL_TRIPS_EXCEPTION(tz, str) …
static int act;
module_param(act, int, 0644);
MODULE_PARM_DESC(…) …;
static int crt;
module_param(crt, int, 0644);
MODULE_PARM_DESC(…) …;
static int tzp;
module_param(tzp, int, 0444);
MODULE_PARM_DESC(…) …;
static int off;
module_param(off, int, 0);
MODULE_PARM_DESC(…) …;
static int psv;
module_param(psv, int, 0644);
MODULE_PARM_DESC(…) …;
static struct workqueue_struct *acpi_thermal_pm_queue;
struct acpi_thermal_trip { … };
struct acpi_thermal_passive { … };
struct acpi_thermal_active { … };
struct acpi_thermal_trips { … };
struct acpi_thermal { … };
static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
{ … }
static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
{ … }
static int acpi_thermal_temp(struct acpi_thermal *tz, int temp_deci_k)
{ … }
static bool acpi_thermal_trip_valid(struct acpi_thermal_trip *acpi_trip)
{ … }
static int active_trip_index(struct acpi_thermal *tz,
struct acpi_thermal_trip *acpi_trip)
{ … }
static long get_passive_temp(struct acpi_thermal *tz)
{ … }
static long get_active_temp(struct acpi_thermal *tz, int index)
{ … }
static void acpi_thermal_update_trip(struct acpi_thermal *tz,
const struct thermal_trip *trip)
{ … }
static bool update_trip_devices(struct acpi_thermal *tz,
struct acpi_thermal_trip *acpi_trip,
int index, bool compare)
{ … }
static void acpi_thermal_update_trip_devices(struct acpi_thermal *tz,
const struct thermal_trip *trip)
{ … }
struct adjust_trip_data { … };
static int acpi_thermal_adjust_trip(struct thermal_trip *trip, void *data)
{ … }
static void acpi_queue_thermal_check(struct acpi_thermal *tz)
{ … }
static void acpi_thermal_trips_update(struct acpi_thermal *tz, u32 event)
{ … }
static int acpi_thermal_get_critical_trip(struct acpi_thermal *tz)
{ … }
static int acpi_thermal_get_hot_trip(struct acpi_thermal *tz)
{ … }
static bool passive_trip_params_init(struct acpi_thermal *tz)
{ … }
static bool acpi_thermal_init_trip(struct acpi_thermal *tz, int index)
{ … }
static void acpi_thermal_get_trip_points(struct acpi_thermal *tz)
{ … }
static int thermal_get_temp(struct thermal_zone_device *thermal, int *temp)
{ … }
static int thermal_get_trend(struct thermal_zone_device *thermal,
const struct thermal_trip *trip,
enum thermal_trend *trend)
{ … }
static void acpi_thermal_zone_device_hot(struct thermal_zone_device *thermal)
{ … }
static void acpi_thermal_zone_device_critical(struct thermal_zone_device *thermal)
{ … }
static bool acpi_thermal_should_bind_cdev(struct thermal_zone_device *thermal,
const struct thermal_trip *trip,
struct thermal_cooling_device *cdev,
struct cooling_spec *c)
{ … }
static const struct thermal_zone_device_ops acpi_thermal_zone_ops = …;
static int acpi_thermal_zone_sysfs_add(struct acpi_thermal *tz)
{ … }
static void acpi_thermal_zone_sysfs_remove(struct acpi_thermal *tz)
{ … }
static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz,
const struct thermal_trip *trip_table,
unsigned int trip_count,
int passive_delay)
{ … }
static void acpi_thermal_unregister_thermal_zone(struct acpi_thermal *tz)
{ … }
static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
{ … }
static void acpi_thermal_aml_dependency_fix(struct acpi_thermal *tz)
{ … }
static void acpi_thermal_guess_offset(struct acpi_thermal *tz, long crit_temp)
{ … }
static void acpi_thermal_check_fn(struct work_struct *work)
{ … }
static void acpi_thermal_free_thermal_zone(struct acpi_thermal *tz)
{ … }
static int acpi_thermal_add(struct acpi_device *device)
{ … }
static void acpi_thermal_remove(struct acpi_device *device)
{ … }
#ifdef CONFIG_PM_SLEEP
static int acpi_thermal_suspend(struct device *dev)
{ … }
static int acpi_thermal_resume(struct device *dev)
{ … }
#else
#define acpi_thermal_suspend …
#define acpi_thermal_resume …
#endif
static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, acpi_thermal_suspend, acpi_thermal_resume);
static const struct acpi_device_id thermal_device_ids[] = …;
MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
static struct acpi_driver acpi_thermal_driver = …;
static int thermal_act(const struct dmi_system_id *d)
{ … }
static int thermal_nocrt(const struct dmi_system_id *d)
{ … }
static int thermal_tzp(const struct dmi_system_id *d)
{ … }
static int thermal_psv(const struct dmi_system_id *d)
{ … }
static const struct dmi_system_id thermal_dmi_table[] __initconst = …;
static int __init acpi_thermal_init(void)
{ … }
static void __exit acpi_thermal_exit(void)
{ … }
module_init(…) …;
module_exit(acpi_thermal_exit);
MODULE_IMPORT_NS(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;