mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-27 20:48:22 +00:00
(Kyösti) Cleanups
Copy sysctl enums to chip drivers from sensors.h for now, as seen in drivers included in 2.5 tree. File no longer included from kernel side. Apply i2c-proc change in CVS tagged -km2. Partial clean and sort of includes everywhere. Add i2c-dev.h, as a partial copy from i2c. Add to sensors.h from i2c-proc.h to compile things. Remove i2c-isa.h. Reflect header file changes to lib/ and prog/. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1705 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
d2e650b473
commit
1cfe63804a
68 files changed
+1609
-879
No files matched your search
+29
-17
@@ -25,19 +25,18 @@
|
||||
and Philip Edelbrock <phil@netroedge.com>
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/io.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/i2c.h>
|
||||
#include "version.h"
|
||||
#include "sensors.h"
|
||||
#include <linux/i2c-proc.h>
|
||||
#include <linux/init.h>
|
||||
#include <asm/errno.h>
|
||||
#include <asm/io.h>
|
||||
#include "version.h"
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -197,8 +196,6 @@ static int fscscy_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int fscscy_detect(struct i2c_adapter *adapter, int address,
|
||||
unsigned short flags, int kind);
|
||||
static int fscscy_detach_client(struct i2c_client *client);
|
||||
static int fscscy_command(struct i2c_client *client, unsigned int cmd,
|
||||
void *arg);
|
||||
|
||||
static int fscscy_read_value(struct i2c_client *client, u8 register);
|
||||
static int fscscy_write_value(struct i2c_client *client, u8 register,
|
||||
@@ -234,10 +231,33 @@ static struct i2c_driver fscscy_driver = {
|
||||
.flags = I2C_DF_NOTIFY,
|
||||
.attach_adapter = fscscy_attach_adapter,
|
||||
.detach_client = fscscy_detach_client,
|
||||
.command = fscscy_command,
|
||||
};
|
||||
|
||||
/* The /proc/sys entries */
|
||||
|
||||
/* -- SENSORS SYSCTL START -- */
|
||||
#define FSCSCY_SYSCTL_VOLT0 1000 /* 12 volt supply */
|
||||
#define FSCSCY_SYSCTL_VOLT1 1001 /* 5 volt supply */
|
||||
#define FSCSCY_SYSCTL_VOLT2 1002 /* batterie voltage*/
|
||||
#define FSCSCY_SYSCTL_FAN0 1101 /* state, min, ripple, actual value fan 0 */
|
||||
#define FSCSCY_SYSCTL_FAN1 1102 /* state, min, ripple, actual value fan 1 */
|
||||
#define FSCSCY_SYSCTL_FAN2 1103 /* state, min, ripple, actual value fan 2 */
|
||||
#define FSCSCY_SYSCTL_FAN3 1104 /* state, min, ripple, actual value fan 3 */
|
||||
#define FSCSCY_SYSCTL_FAN4 1105 /* state, min, ripple, actual value fan 4 */
|
||||
#define FSCSCY_SYSCTL_FAN5 1106 /* state, min, ripple, actual value fan 5 */
|
||||
#define FSCSCY_SYSCTL_TEMP0 1201 /* state and value of sensor 0, cpu die */
|
||||
#define FSCSCY_SYSCTL_TEMP1 1202 /* state and value of sensor 1, motherboard */
|
||||
#define FSCSCY_SYSCTL_TEMP2 1203 /* state and value of sensor 2, chassis */
|
||||
#define FSCSCY_SYSCTL_TEMP3 1204 /* state and value of sensor 3, chassis */
|
||||
#define FSCSCY_SYSCTL_REV 2000 /* Revision */
|
||||
#define FSCSCY_SYSCTL_EVENT 2001 /* global event status */
|
||||
#define FSCSCY_SYSCTL_CONTROL 2002 /* global control byte */
|
||||
#define FSCSCY_SYSCTL_WDOG 2003 /* state, min, ripple, actual value fan 2 */
|
||||
#define FSCSCY_SYSCTL_PCILOAD 2004 /* PCILoad value */
|
||||
#define FSCSCY_SYSCTL_INTRUSION 2005 /* state, control for intrusion sensor */
|
||||
|
||||
/* -- SENSORS SYSCTL END -- */
|
||||
|
||||
/* These files are created for each detected FSCSCY. This is just a template;
|
||||
though at first sight, you might think we could use a statically
|
||||
allocated list, we need some way to get back to the parent - which
|
||||
@@ -357,8 +377,7 @@ int fscscy_detect(struct i2c_adapter *adapter, int address,
|
||||
|
||||
/* Register a new directory entry with module sensors */
|
||||
if ((i = i2c_register_entry(new_client, type_name,
|
||||
fscscy_dir_table_template,
|
||||
THIS_MODULE)) < 0) {
|
||||
fscscy_dir_table_template)) < 0) {
|
||||
err = i;
|
||||
goto ERROR4;
|
||||
}
|
||||
@@ -396,13 +415,6 @@ static int fscscy_detach_client(struct i2c_client *client)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* No commands defined yet */
|
||||
static int fscscy_command(struct i2c_client *client, unsigned int cmd, void *arg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int fscscy_read_value(struct i2c_client *client, u8 reg)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
|
||||
Reference in new issue
Block a user