Changeset 158

Show
Ignore:
Timestamp:
01/13/99 02:32:09 (10 years ago)
Author:
frodo
Message:

The beginnings of i2c-dev

Everything is in, except the IOCTL hook (which will be pretty simple to add).
It compiles cleanly. It is not tested at all.

Also a very small fix for i2c-proc, and Makefile.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/Makefile

    r144 r158  
    2525# is a bit complicated because SMP configuration changed around kernel 2.1.130 
    2626SMP := $(shell if grep -q '^SMP[[:space:]]*=' /usr/src/linux/Makefile || \ 
    27                   grep -q '^CONFIG_SMP=y' /usr/src/linux/.config ;
     27                  grep -q '^[[:space:]]*\#define[[::space:]]*CONFIG_SMP[[:space:]]*1' /usr/include/linux/autoconf.h ;
    2828               then echo 1; else echo 0; fi) 
    2929#SMP := 0 
  • lm-sensors/trunk/TODO

    r139 r158  
    11Many, many things. Most notably: 
    22 
     3* Fans give overflow if small values are written to them. 
    34* At least the bit-lp and bit-velle modules do no detection on loading; 
    45  ask Simon whether this is possible to add. 
     
    1314  places, probably (everywhere where global vars are accessed). This must be 
    1415  done for the i2c modules, too. 
     16* Better general locking, or at least a once-over to check no race-conditions 
     17  remain. 
    1518* Make lm78.c detect 'double hits', (same chip connected to both SMBus and 
    1619  ISA). 
    1720* Better chip detection; insmod-time paramters to set addresses  
    1821  (difficult, because of all i2c busses!). 
     22* At least one case report that unused port addresses do not return 0xff 
    1923* Registrate which i2c addresses are used (a la ISA) for each adapter. 
    2024* Rename i2c-proc.c to i2c-user.c, and extend it with /dev entries; 
  • lm-sensors/trunk/kernel/Module.mk

    r155 r158  
    2929              $(MODULE_DIR)/eeprom.o $(MODULE_DIR)/w83781d.o \ 
    3030              $(MODULE_DIR)/lm80.o $(MODULE_DIR)/adm1021.o \ 
    31               $(MODULE_DIR)/adm9240.o $(MODULE_DIR)/ltc1710.o 
     31              $(MODULE_DIR)/adm9240.o $(MODULE_DIR)/ltc1710.o \ 
     32              $(MODULE_DIR)/i2c-dev.o 
    3233 
    3334SRCHEADERFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/isa.h \ 
  • lm-sensors/trunk/kernel/i2c-proc.c

    r147 r158  
    460460void i2cproc_inc_use(struct i2c_client *client) 
    461461{ 
     462#ifdef MODULE 
     463  MOD_INC_USE_COUNT; 
     464#endif 
    462465} 
    463466 
     
    465468void i2cproc_dec_use(struct i2c_client *client) 
    466469{ 
     470#ifdef MODULE 
     471  MOD_DEC_USE_COUNT; 
     472#endif 
    467473} 
    468474 
  • lm-sensors/trunk/kernel/include/sensors.h

    r155 r158  
    8282 
    8383/* Driver IDs */ 
     84#define I2C_DRIVERID_I2CDEV 1000 
    8485#define I2C_DRIVERID_I2CPROC 1001 
    8586#define I2C_DRIVERID_LM78 1002 
  • lm-sensors/trunk/src/Module.mk

    r155 r158  
    2929              $(MODULE_DIR)/eeprom.o $(MODULE_DIR)/w83781d.o \ 
    3030              $(MODULE_DIR)/lm80.o $(MODULE_DIR)/adm1021.o \ 
    31               $(MODULE_DIR)/adm9240.o $(MODULE_DIR)/ltc1710.o 
     31              $(MODULE_DIR)/adm9240.o $(MODULE_DIR)/ltc1710.o \ 
     32              $(MODULE_DIR)/i2c-dev.o 
    3233 
    3334SRCHEADERFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/isa.h \ 
  • lm-sensors/trunk/src/i2c-proc.c

    r147 r158  
    460460void i2cproc_inc_use(struct i2c_client *client) 
    461461{ 
     462#ifdef MODULE 
     463  MOD_INC_USE_COUNT; 
     464#endif 
    462465} 
    463466 
     
    465468void i2cproc_dec_use(struct i2c_client *client) 
    466469{ 
     470#ifdef MODULE 
     471  MOD_DEC_USE_COUNT; 
     472#endif 
    467473} 
    468474 
  • lm-sensors/trunk/src/sensors.h

    r155 r158  
    8282 
    8383/* Driver IDs */ 
     84#define I2C_DRIVERID_I2CDEV 1000 
    8485#define I2C_DRIVERID_I2CPROC 1001 
    8586#define I2C_DRIVERID_LM78 1002