#include <linux/acpi.h>
#include <linux/devm-helpers.h>
#include <linux/gpio/consumer.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/platform_device.h>
#include <linux/power_supply.h>
#include <linux/thermal.h>
#include <linux/workqueue.h>
#define MAX_SPEED …
#define TEMP_LIMIT0_DEFAULT …
#define TEMP_LIMIT1_DEFAULT …
#define TEMP_LIMIT2_DEFAULT …
#define HYSTERESIS_DEFAULT …
#define SPEED_ON_AC_DEFAULT …
static int temp_limits[3] = …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
static int hysteresis = …;
module_param(hysteresis, int, 0444);
MODULE_PARM_DESC(…) …;
static int speed_on_ac = …;
module_param(speed_on_ac, int, 0444);
MODULE_PARM_DESC(…) …;
struct gpd_pocket_fan_data { … };
static void gpd_pocket_fan_set_speed(struct gpd_pocket_fan_data *fan, int speed)
{ … }
static int gpd_pocket_fan_min_speed(void)
{ … }
static void gpd_pocket_fan_worker(struct work_struct *work)
{ … }
static void gpd_pocket_fan_force_update(struct gpd_pocket_fan_data *fan)
{ … }
static int gpd_pocket_fan_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int gpd_pocket_fan_suspend(struct device *dev)
{ … }
static int gpd_pocket_fan_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(gpd_pocket_fan_pm_ops,
gpd_pocket_fan_suspend,
gpd_pocket_fan_resume);
static struct acpi_device_id gpd_pocket_fan_acpi_match[] = …;
MODULE_DEVICE_TABLE(acpi, gpd_pocket_fan_acpi_match);
static struct platform_driver gpd_pocket_fan_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;