#include <linux/types.h>
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/suspend.h>
#include <linux/kthread.h>
#include <linux/moduleparam.h>
#include <linux/freezer.h>
#include <linux/of_platform.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/io.h>
#include <asm/sections.h>
Go to the source code of this file.
|
| MODULE_AUTHOR ("Colin Leroy <[email protected]>") |
|
| MODULE_DESCRIPTION ("Driver for ADT746x thermostat in iBook G4 and ""Powerbook G4 Alu") |
|
| MODULE_LICENSE ("GPL") |
|
| module_param (limit_adjust, int, 0644) |
|
| MODULE_PARM_DESC (limit_adjust,"Adjust maximum temperatures (50 sensor1, 70 sensor2) ""by N degrees.") |
|
| module_param (fan_speed, int, 0644) |
|
| MODULE_PARM_DESC (fan_speed,"Specify starting fan speed (0-255) ""(default 64)") |
|
| module_param (verbose, bool, 0) |
|
| MODULE_PARM_DESC (verbose,"Verbose log operations ""(default 0)") |
|
| BUILD_SHOW_FUNC_INT (sensor1_temperature,(read_reg(th, TEMP_REG[1]))) |
|
| MODULE_DEVICE_TABLE (i2c, therm_adt746x_id) |
|
| module_init (thermostat_init) |
|
| module_exit (thermostat_exit) |
|
#define BUILD_SHOW_FUNC_FAN |
( |
|
name, |
|
|
|
data |
|
) |
| |
#define BUILD_SHOW_FUNC_INT |
( |
|
name, |
|
|
|
data |
|
) |
| |
#define BUILD_SHOW_FUNC_INT_LITE |
( |
|
name, |
|
|
|
data |
|
) |
| |
#define BUILD_SHOW_FUNC_STR |
( |
|
name, |
|
|
|
data |
|
) |
| |
#define BUILD_STORE_FUNC_DEG |
( |
|
name, |
|
|
|
data |
|
) |
| |
Value:
printk(
KERN_INFO "Adjusting limits by %d degrees\n", val); \
for (i=0; i < 3; i++) \
set_limit(th, i); \
}
Definition at line 348 of file therm_adt746x.c.
#define BUILD_STORE_FUNC_INT |
( |
|
name, |
|
|
|
data |
|
) |
| |
Value:
{ \
if (val < 0 || val > 255) \
printk(
KERN_INFO "Setting specified fan speed to %d\n", val);
\
}
Definition at line 362 of file therm_adt746x.c.
MODULE_DEVICE_TABLE |
( |
i2c |
, |
|
|
therm_adt746x_id |
|
|
) |
| |
module_exit |
( |
thermostat_exit |
| ) |
|
module_init |
( |
thermostat_init |
| ) |
|
module_param |
( |
limit_adjust |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
module_param |
( |
fan_speed |
, |
|
|
int |
, |
|
|
0644 |
|
|
) |
| |
MODULE_PARM_DESC |
( |
limit_adjust |
, |
|
|
"Adjust maximum temperatures (50 sensor1, 70 sensor2) ""by N degrees." |
|
|
) |
| |
MODULE_PARM_DESC |
( |
fan_speed |
, |
|
|
"Specify starting fan speed (0-255) ""(default 64)" |
|
|
) |
| |
MODULE_PARM_DESC |
( |
verbose |
, |
|
|
"Verbose log operations ""(default 0)" |
|
|
) |
| |