#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#include <linux/platform_device.h>
#include <linux/hwmon.h>
#include <linux/hwmon-sysfs.h>
#include <linux/hwmon-vid.h>
#include <linux/err.h>
#include <linux/mutex.h>
#include <linux/acpi.h>
#include <linux/io.h>
#define DRIVER_NAME …
#define CHAN_CNVRTD …
#define CHAN_ENA …
#define CHAN_ALM_ENA …
#define CHAN_READY …
#define TEMP_OTS_OE …
#define VIN_RW1C_MASK …
#define TEMP_RW1C_MASK …
static u8 devid;
static struct platform_device *pdev;
static unsigned short extra_isa[3];
static u8 confreg[4];
static int init = …;
module_param(init, int, 0);
MODULE_PARM_DESC(…) …;
static unsigned short force_id;
module_param(force_id, ushort, 0);
MODULE_PARM_DESC(…) …;
#define DEV …
#define DEVID …
#define ACT …
#define BASE …
#define FSCM …
#define VLM …
#define TMS …
#define LDNI_MAX …
static const u8 logdev[LDNI_MAX] = …;
#define LD_FAN …
#define LD_IN …
#define LD_TEMP …
static inline void superio_outb(int sioaddr, int reg, int val)
{ … }
static inline int superio_inb(int sioaddr, int reg)
{ … }
static inline void superio_exit(int sioaddr)
{ … }
#define PC87360_EXTENT …
#define PC87365_REG_BANK …
#define NO_BANK …
#define PC87360_REG_PRESCALE(nr) …
#define PC87360_REG_PWM(nr) …
#define PC87360_REG_FAN_MIN(nr) …
#define PC87360_REG_FAN(nr) …
#define PC87360_REG_FAN_STATUS(nr) …
#define FAN_FROM_REG(val, div) …
#define FAN_TO_REG(val, div) …
#define FAN_DIV_FROM_REG(val) …
#define FAN_STATUS_FROM_REG(val) …
#define FAN_CONFIG_MONITOR(val, nr) …
#define FAN_CONFIG_CONTROL(val, nr) …
#define FAN_CONFIG_INVERT(val, nr) …
#define PWM_FROM_REG(val, inv) …
static inline u8 PWM_TO_REG(int val, int inv)
{ … }
#define PC87365_REG_IN_CONVRATE …
#define PC87365_REG_IN_CONFIG …
#define PC87365_REG_IN …
#define PC87365_REG_IN_MIN …
#define PC87365_REG_IN_MAX …
#define PC87365_REG_IN_STATUS …
#define PC87365_REG_IN_ALARMS1 …
#define PC87365_REG_IN_ALARMS2 …
#define PC87365_REG_VID …
#define IN_FROM_REG(val, ref) …
#define IN_TO_REG(val, ref) …
#define PC87365_REG_TEMP_CONFIG …
#define PC87365_REG_TEMP …
#define PC87365_REG_TEMP_MIN …
#define PC87365_REG_TEMP_MAX …
#define PC87365_REG_TEMP_CRIT …
#define PC87365_REG_TEMP_STATUS …
#define PC87365_REG_TEMP_ALARMS …
#define TEMP_FROM_REG(val) …
#define TEMP_TO_REG(val) …
struct pc87360_data { … };
static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank,
u8 reg)
{ … }
static void pc87360_write_value(struct pc87360_data *data, u8 ldi, u8 bank,
u8 reg, u8 value)
{ … }
static void pc87360_autodiv(struct device *dev, int nr)
{ … }
static struct pc87360_data *pc87360_update_device(struct device *dev)
{ … }
static ssize_t in_input_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute in_input[] = …;
static ssize_t in_status_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute in_status[] = …;
static ssize_t in_min_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t in_min_store(struct device *dev,
struct device_attribute *devattr, const char *buf,
size_t count)
{ … }
static struct sensor_device_attribute in_min[] = …;
static ssize_t in_max_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t in_max_store(struct device *dev,
struct device_attribute *devattr, const char *buf,
size_t count)
{ … }
static struct sensor_device_attribute in_max[] = …;
#define CHAN_ALM_MIN …
#define CHAN_ALM_MAX …
#define TEMP_ALM_CRIT …
static ssize_t in_min_alarm_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute in_min_alarm[] = …;
static ssize_t in_max_alarm_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute in_max_alarm[] = …;
#define VIN_UNIT_ATTRS(X) …
static ssize_t cpu0_vid_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(cpu0_vid);
static ssize_t vrm_show(struct device *dev, struct device_attribute *attr,
char *buf)
{ … }
static ssize_t vrm_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_RW(vrm);
static ssize_t alarms_in_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(alarms_in);
static struct attribute *pc8736x_vin_attr_array[] = …;
static const struct attribute_group pc8736x_vin_group = …;
static ssize_t therm_input_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute therm_input[] = …;
static ssize_t therm_status_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute therm_status[] = …;
static ssize_t therm_min_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t therm_min_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute therm_min[] = …;
static ssize_t therm_max_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t therm_max_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute therm_max[] = …;
static ssize_t therm_crit_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t therm_crit_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute therm_crit[] = …;
static ssize_t therm_min_alarm_show(struct device *dev,
struct device_attribute *devattr,
char *buf)
{ … }
static struct sensor_device_attribute therm_min_alarm[] = …;
static ssize_t therm_max_alarm_show(struct device *dev,
struct device_attribute *devattr,
char *buf)
{ … }
static struct sensor_device_attribute therm_max_alarm[] = …;
static ssize_t therm_crit_alarm_show(struct device *dev,
struct device_attribute *devattr,
char *buf)
{ … }
static struct sensor_device_attribute therm_crit_alarm[] = …;
#define THERM_UNIT_ATTRS(X) …
static struct attribute *pc8736x_therm_attr_array[] = …;
static const struct attribute_group pc8736x_therm_group = …;
static ssize_t temp_input_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute temp_input[] = …;
static ssize_t temp_status_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute temp_status[] = …;
static ssize_t temp_min_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t temp_min_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute temp_min[] = …;
static ssize_t temp_max_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t temp_max_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute temp_max[] = …;
static ssize_t temp_crit_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t temp_crit_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute temp_crit[] = …;
static ssize_t temp_min_alarm_show(struct device *dev,
struct device_attribute *devattr,
char *buf)
{ … }
static struct sensor_device_attribute temp_min_alarm[] = …;
static ssize_t temp_max_alarm_show(struct device *dev,
struct device_attribute *devattr,
char *buf)
{ … }
static struct sensor_device_attribute temp_max_alarm[] = …;
static ssize_t temp_crit_alarm_show(struct device *dev,
struct device_attribute *devattr,
char *buf)
{ … }
static struct sensor_device_attribute temp_crit_alarm[] = …;
#define TEMP_FAULT …
static ssize_t temp_fault_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute temp_fault[] = …;
#define TEMP_UNIT_ATTRS(X) …
static struct attribute *pc8736x_temp_attr[][10] = …;
static const struct attribute_group pc8736x_temp_attr_group[] = …;
static ssize_t alarms_temp_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RO(alarms_temp);
static ssize_t fan_input_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute fan_input[] = …;
static ssize_t fan_status_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute fan_status[] = …;
static ssize_t fan_div_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static struct sensor_device_attribute fan_div[] = …;
static ssize_t fan_min_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static ssize_t fan_min_store(struct device *dev,
struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute fan_min[] = …;
#define FAN_UNIT_ATTRS(X) …
static struct attribute *pc8736x_fan_attr[][5] = …;
static const struct attribute_group pc8736x_fan_attr_group[] = …;
static ssize_t pwm_show(struct device *dev, struct device_attribute *devattr,
char *buf)
{ … }
static ssize_t pwm_store(struct device *dev, struct device_attribute *devattr,
const char *buf, size_t count)
{ … }
static struct sensor_device_attribute pwm[] = …;
static ssize_t name_show(struct device *dev,
struct device_attribute *devattr, char *buf)
{ … }
static DEVICE_ATTR_RO(name);
static void pc87360_remove_files(struct device *dev)
{ … }
static void pc87360_init_device(struct platform_device *pdev,
int use_thermistors)
{ … }
static int pc87360_probe(struct platform_device *pdev)
{ … }
static void pc87360_remove(struct platform_device *pdev)
{ … }
static struct platform_driver pc87360_driver = …;
static int __init pc87360_find(int sioaddr, u8 *devid,
unsigned short *addresses)
{ … }
static int __init pc87360_device_add(unsigned short address)
{ … }
static int __init pc87360_init(void)
{ … }
static void __exit pc87360_exit(void)
{ … }
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_ALIAS(…) …;
module_init(…) …;
module_exit(pc87360_exit);