#include <linux/acpi.h>
#include <linux/dmi.h>
#include <linux/hwmon.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/processor.h>
static u32 oxp_mutex;
#define ACPI_LOCK_DELAY_MS …
static bool lock_global_acpi_lock(void)
{ … }
static bool unlock_global_acpi_lock(void)
{ … }
enum oxp_board { … };
static enum oxp_board board;
#define OXP_SENSOR_FAN_REG …
#define OXP_SENSOR_PWM_ENABLE_REG …
#define OXP_SENSOR_PWM_REG …
#define OXP_OLD_TURBO_SWITCH_REG …
#define OXP_OLD_TURBO_TAKE_VAL …
#define OXP_OLD_TURBO_RETURN_VAL …
#define OXP_TURBO_SWITCH_REG …
#define OXP_TURBO_TAKE_VAL …
#define OXP_TURBO_RETURN_VAL …
static const struct dmi_system_id dmi_table[] = …;
static int read_from_ec(u8 reg, int size, long *val)
{ … }
static int write_to_ec(u8 reg, u8 value)
{ … }
static int tt_toggle_enable(void)
{ … }
static int tt_toggle_disable(void)
{ … }
static umode_t tt_toggle_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static ssize_t tt_toggle_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count)
{ … }
static ssize_t tt_toggle_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(tt_toggle);
static int oxp_pwm_enable(void)
{ … }
static int oxp_pwm_disable(void)
{ … }
static umode_t oxp_ec_hwmon_is_visible(const void *drvdata,
enum hwmon_sensor_types type, u32 attr, int channel)
{ … }
static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long *val)
{ … }
static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type,
u32 attr, int channel, long val)
{ … }
static const struct hwmon_channel_info * const oxp_platform_sensors[] = …;
static struct attribute *oxp_ec_attrs[] = …;
static struct attribute_group oxp_ec_attribute_group = …;
static const struct attribute_group *oxp_ec_groups[] = …;
static const struct hwmon_ops oxp_ec_hwmon_ops = …;
static const struct hwmon_chip_info oxp_ec_chip_info = …;
static int oxp_platform_probe(struct platform_device *pdev)
{ … }
static struct platform_driver oxp_platform_driver = …;
static struct platform_device *oxp_platform_device;
static int __init oxp_platform_init(void)
{ … }
static void __exit oxp_platform_exit(void)
{ … }
MODULE_DEVICE_TABLE(dmi, dmi_table);
module_init(…) …;
module_exit(oxp_platform_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;