Show
Ignore:
Timestamp:
01/21/03 21:01:27 (10 years ago)
Author:
kmalkki
Message:

(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/.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/chips/fscscy.c

    r1698 r1705  
    2626*/ 
    2727 
    28 #include <linux/version.h> 
    2928#include <linux/module.h> 
    3029#include <linux/slab.h> 
     
    3231#include <linux/ioport.h> 
    3332#include <linux/sysctl.h> 
     33#include <linux/types.h> 
     34#include <linux/i2c.h> 
     35#include <linux/i2c-proc.h> 
     36#include <linux/init.h> 
    3437#include <asm/errno.h> 
    3538#include <asm/io.h> 
    36 #include <linux/types.h> 
    37 #include <linux/i2c.h> 
    3839#include "version.h" 
    39 #include "sensors.h" 
    40 #include <linux/init.h> 
    4140 
    4241MODULE_LICENSE("GPL"); 
     
    198197                       unsigned short flags, int kind); 
    199198static int fscscy_detach_client(struct i2c_client *client); 
    200 static int fscscy_command(struct i2c_client *client, unsigned int cmd, 
    201                         void *arg); 
    202199 
    203200static int fscscy_read_value(struct i2c_client *client, u8 register); 
     
    235232        .attach_adapter = fscscy_attach_adapter, 
    236233        .detach_client  = fscscy_detach_client, 
    237         .command        = fscscy_command, 
    238234}; 
    239235 
    240236/* The /proc/sys entries */ 
     237 
     238/* -- SENSORS SYSCTL START -- */ 
     239#define FSCSCY_SYSCTL_VOLT0    1000       /* 12 volt supply */ 
     240#define FSCSCY_SYSCTL_VOLT1    1001       /* 5 volt supply */ 
     241#define FSCSCY_SYSCTL_VOLT2    1002       /* batterie voltage*/ 
     242#define FSCSCY_SYSCTL_FAN0     1101       /* state, min, ripple, actual value fan 0 */ 
     243#define FSCSCY_SYSCTL_FAN1     1102       /* state, min, ripple, actual value fan 1 */ 
     244#define FSCSCY_SYSCTL_FAN2     1103       /* state, min, ripple, actual value fan 2 */ 
     245#define FSCSCY_SYSCTL_FAN3     1104       /* state, min, ripple, actual value fan 3 */ 
     246#define FSCSCY_SYSCTL_FAN4     1105       /* state, min, ripple, actual value fan 4 */ 
     247#define FSCSCY_SYSCTL_FAN5     1106       /* state, min, ripple, actual value fan 5 */ 
     248#define FSCSCY_SYSCTL_TEMP0    1201       /* state and value of sensor 0, cpu die */ 
     249#define FSCSCY_SYSCTL_TEMP1    1202       /* state and value of sensor 1, motherboard */ 
     250#define FSCSCY_SYSCTL_TEMP2    1203       /* state and value of sensor 2, chassis */ 
     251#define FSCSCY_SYSCTL_TEMP3    1204       /* state and value of sensor 3, chassis */ 
     252#define FSCSCY_SYSCTL_REV     2000        /* Revision */ 
     253#define FSCSCY_SYSCTL_EVENT   2001        /* global event status */ 
     254#define FSCSCY_SYSCTL_CONTROL 2002        /* global control byte */ 
     255#define FSCSCY_SYSCTL_WDOG     2003       /* state, min, ripple, actual value fan 2 */ 
     256#define FSCSCY_SYSCTL_PCILOAD  2004       /* PCILoad value */ 
     257#define FSCSCY_SYSCTL_INTRUSION 2005      /* state, control for intrusion sensor */ 
     258 
     259/* -- SENSORS SYSCTL END -- */ 
     260 
    241261/* These files are created for each detected FSCSCY. This is just a template; 
    242262   though at first sight, you might think we could use a statically 
     
    358378        /* Register a new directory entry with module sensors */ 
    359379        if ((i = i2c_register_entry(new_client, type_name, 
    360                                         fscscy_dir_table_template, 
    361                                         THIS_MODULE)) < 0) { 
     380                                        fscscy_dir_table_template)) < 0) { 
    362381                err = i; 
    363382                goto ERROR4; 
     
    396415        return 0; 
    397416} 
    398  
    399 /* No commands defined yet */ 
    400 static int fscscy_command(struct i2c_client *client, unsigned int cmd, void *arg) 
    401 { 
    402         return 0; 
    403 } 
    404  
    405417 
    406418static int fscscy_read_value(struct i2c_client *client, u8 reg)