Changeset 29

Show
Ignore:
Timestamp:
12/04/98 01:47:40 (15 years ago)
Author:
frodo
Message:

LM75 driver finished

Well, it should work. But until we have implemented the remaining parts of
piix4.o, we won't be able to test it. Anybody?

Location:
lm-sensors/trunk
Files:
2 added
7 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/TODO

    r22 r29  
    1313* Make lm78.c detect 'double hits', (same chip connected to both SMBus and 
    1414  ISA). 
    15 * Better lm78 detection; insmod-time paramters to set addresses (difficult, 
    16   because of all i2c busses!). 
     15* Better lm78/lm75 detection; insmod-time paramters to set addresses  
     16  (difficult, because of all i2c busses!). 
    1717* Check whether some lm78 functionality is chip-generic and can be moved to 
    1818  sensors.c. 
     19* Registrate which i2c addresses are used (a la ISA) for each adapter. 
    1920* Rename i2c-proc.c to i2c-user.c, and extend it with /dev entries; 
    2021  or, create a better i2c-dev.c, that understands SMBus commands. 
  • lm-sensors/trunk/kernel/Module.mk

    r19 r29  
    2525SRCTARGETS := $(MODULE_DIR)/smbus.o $(MODULE_DIR)/piix4.o $(MODULE_DIR)/isa.o \ 
    2626              $(MODULE_DIR)/lm78.o $(MODULE_DIR)/sensors.o  \ 
    27               $(MODULE_DIR)/i2c-proc.o 
     27              $(MODULE_DIR)/i2c-proc.o $(MODULE_DIR)/lm75.o 
    2828 
    2929HEADERFILES := $(MODULE_DIR)/sensors.h  
  • lm-sensors/trunk/kernel/chips/lm78.c

    r28 r29  
    443443       adapter, and check whether they are used here */ 
    444444 
    445     if (smbus_read_byte_data(adapter,address,1) == 0xff)  
     445    if (smbus_read_byte_data(adapter,address,LM78_REG_CONFIG) == 0xff)  
    446446      continue; 
    447447 
     
    466466 
    467467 
    468     /* Allocate space for a new client structure */ 
     468    /* Allocate space for a new client structure. To counter memory 
     469       ragmentation somewhat, we only do one kmalloc. */ 
    469470    if (! (new_client = kmalloc(sizeof(struct i2c_client) +  
    470471                                sizeof(struct lm78_data), 
  • lm-sensors/trunk/kernel/include/sensors.h

    r28 r29  
    2121#define SENSORS_SENSORS_H 
    2222 
     23/* Next two must be included before sysctl.h can be included, in 2.0 kernels */ 
     24#include <linux/types.h> 
     25#include <linux/fs.h> 
    2326#include <linux/sysctl.h> 
    2427 
     
    7881#define I2C_DRIVERID_I2CPROC 1001 
    7982#define I2C_DRIVERID_LM78 1002 
     83#define I2C_DRIVERID_LM75 1003 
    8084 
    8185/* Sysctl IDs */ 
     
    102106#define LM78_SYSCTL_ALARMS 2001 /* bitvector */ 
    103107 
     108#define LM75_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ 
     109 
    104110#endif /* def SENSORS_SENSORS_H */ 
  • lm-sensors/trunk/src/Module.mk

    r19 r29  
    2525SRCTARGETS := $(MODULE_DIR)/smbus.o $(MODULE_DIR)/piix4.o $(MODULE_DIR)/isa.o \ 
    2626              $(MODULE_DIR)/lm78.o $(MODULE_DIR)/sensors.o  \ 
    27               $(MODULE_DIR)/i2c-proc.o 
     27              $(MODULE_DIR)/i2c-proc.o $(MODULE_DIR)/lm75.o 
    2828 
    2929HEADERFILES := $(MODULE_DIR)/sensors.h  
  • lm-sensors/trunk/src/lm78.c

    r28 r29  
    443443       adapter, and check whether they are used here */ 
    444444 
    445     if (smbus_read_byte_data(adapter,address,1) == 0xff)  
     445    if (smbus_read_byte_data(adapter,address,LM78_REG_CONFIG) == 0xff)  
    446446      continue; 
    447447 
     
    466466 
    467467 
    468     /* Allocate space for a new client structure */ 
     468    /* Allocate space for a new client structure. To counter memory 
     469       ragmentation somewhat, we only do one kmalloc. */ 
    469470    if (! (new_client = kmalloc(sizeof(struct i2c_client) +  
    470471                                sizeof(struct lm78_data), 
  • lm-sensors/trunk/src/sensors.h

    r28 r29  
    2121#define SENSORS_SENSORS_H 
    2222 
     23/* Next two must be included before sysctl.h can be included, in 2.0 kernels */ 
     24#include <linux/types.h> 
     25#include <linux/fs.h> 
    2326#include <linux/sysctl.h> 
    2427 
     
    7881#define I2C_DRIVERID_I2CPROC 1001 
    7982#define I2C_DRIVERID_LM78 1002 
     83#define I2C_DRIVERID_LM75 1003 
    8084 
    8185/* Sysctl IDs */ 
     
    102106#define LM78_SYSCTL_ALARMS 2001 /* bitvector */ 
    103107 
     108#define LM75_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ 
     109 
    104110#endif /* def SENSORS_SENSORS_H */