Changeset 496

Show
Ignore:
Timestamp:
07/19/99 13:45:27 (14 years ago)
Author:
frodo
Message:

First round of lm_sensors changes for the new I2C tree

* The i2c package can no longer be compiled as part of the lm_sensors tree
* The archive of the i2c package is removed
* smbus, i2c-dev and i2c-proc modules and headers have been removed; they

are now completely integrated into the i2c package

* The fake i2c.h header has been removed; this also allowed us to remove

the ugly LM_SENSORS and TBD defines.

* A new variable I2C_HEADERS is introduced in the Makefile. This allows

us to install the i2c headers in, for example, /usr/local/include/linux.

* All files now include <linux/i2c.h> instead of "i2c.h" and "smbus.h"

Status: 'make dep' works, all the right include files are found. 'make all'

does not yet work.

Location:
lm-sensors/trunk
Files:
7 removed
28 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/Makefile

    r495 r496  
    2727LINUX_HEADERS=/usr/include 
    2828 
     29# If you have installed the i2c header at some other place (like  
     30# /usr/local/include/linux), set that directory here. Please check this out 
     31# if you get strange compilation errors; the default Linux i2c headers 
     32# may be used mistakenly. 
     33I2C_HEADERS=/usr/local/include 
     34 
    2935# The location of linux itself. This is only used to determine whether you 
    3036# use a SMP kernel in the magic invocation just below. 
     
    4450#MODVER := 0 
    4551#MODVER := 1 
    46  
    47 # Uncomment the second line if you do not want to compile the included 
    48 # i2c modules. WARNING! If the i2c module version does not match the  
    49 # smbus/sensor module versions, you will get into severe problems. 
    50 # If you want to use a self-compiled version of the i2c modules, make 
    51 # sure <linux/i2c.h> contains the *correct* i2c header file! The stock 
    52 # Linux 2.1.xxx and 2.2.x modules are *not* good enough; you really need 
    53 # Simon Vogl's version! 
    54 I2C := 1 
    55 #I2C := 0 
    5652 
    5753# Uncomment the second line if you are a developer. This will enable many 
     
    130126SRCDIRS := kernel kernel/busses kernel/chips kernel/include lib prog/sensors \ 
    131127           prog/dump prog/detect etc 
    132 ifeq ($(I2C),1) 
    133 SRCDIRS += i2c i2c/detect i2c/drivers i2c/eeprom 
    134 endif 
    135128 
    136129# Some often-used commands with default options 
     
    150143# ARCFLAGS are used to create archive object files (static libraries), and 
    151144# LIBCFLAGS are for shared library objects. 
    152 CFLAGS := -I. -Ii2c -Ikernel/include -I$(LINUX_HEADERS) -O2 -DLM_SENSORS 
     145CFLAGS := -I. -Ikernel/include -I$(I2C_HEADERS) -I$(LINUX_HEADERS) -O2  
    153146 
    154147ifeq ($(DEBUG),1) 
     
    159152CFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ 
    160153          -Wcast-align -Wwrite-strings -Wnested-externs -Winline 
    161 endif 
    162  
    163 ifeq ($(I2C),1) 
    164 CFLAGS += -DI2C 
    165154endif 
    166155 
  • lm-sensors/trunk/kernel/Module.mk

    r207 r496  
    2323# Regrettably, even 'simply expanded variables' will not put their currently 
    2424# defined value verbatim into the command-list of rules... 
    25 KERNELTARGETS := $(MODULE_DIR)/smbus.o \ 
    26                  $(MODULE_DIR)/i2c-proc.o \ 
    27                  $(MODULE_DIR)/i2c-dev.o $(MODULE_DIR)/sensors.o 
     25KERNELTARGETS := $(MODULE_DIR)/sensors.o 
    2826 
    2927# Include all dependency files 
  • lm-sensors/trunk/kernel/busses/i2c-ali15x3.c

    r310 r496  
    7575#include <linux/sched.h> 
    7676#include <linux/ioport.h> 
    77 #include "smbus.h" 
     77#include <linux/i2c.h> 
    7878#include "version.h" 
    7979#include "compat.h" 
  • lm-sensors/trunk/kernel/busses/i2c-hydra.c

    r442 r496  
    3232#include <linux/types.h> 
    3333 
    34 #include "i2c.h" 
    35 #include "algo-bit.h" 
     34#include <linux/i2c.h> 
     35#include <linux/i2c-algo-bit.h> 
    3636#include "compat.h" 
    3737 
  • lm-sensors/trunk/kernel/busses/i2c-isa.c

    r477 r496  
    3030#include "compat.h" 
    3131 
    32 #include "i2c.h" 
    33 #ifdef I2C_SPINLOCK 
    34 #include <asm/spinlock.h> 
    35 #else 
     32#include <linux/i2c.h> 
    3633#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,19) 
    3734#include <linux/sched.h> 
    3835#else 
    3936#include <asm/semaphore.h> 
    40 #endif 
    4137#endif 
    4238 
  • lm-sensors/trunk/kernel/busses/i2c-piix4.c

    r357 r496  
    2929#include <linux/sched.h> 
    3030#include <linux/ioport.h> 
    31 #include "smbus.h" 
     31#include <linux/i2c.h> 
    3232#include "version.h" 
    3333#include "compat.h" 
  • lm-sensors/trunk/kernel/busses/i2c-via.c

    r476 r496  
    3434#endif 
    3535 
    36 #include "i2c.h" 
    37 #include "algo-bit.h" 
     36#include <linux/i2c.h> 
     37#include <linux/i2c-algo-bit.h> 
    3838#include "compat.h" 
    3939 
  • lm-sensors/trunk/kernel/busses/i2c-voodoo3.c

    r473 r496  
    3737#include <linux/ioport.h> 
    3838#include <linux/delay.h> 
    39 #include "smbus.h" 
     39#include <linux/i2c.h> 
    4040#include "version.h" 
    4141#include "compat.h" 
  • lm-sensors/trunk/kernel/chips/adm1021.c

    r467 r496  
    2222#include <linux/module.h> 
    2323#include <linux/malloc.h> 
    24 #include "smbus.h" 
     24#include <linux/i2c.h> 
    2525#include "sensors.h" 
    26 #include "i2c.h" 
    2726#include "i2c-isa.h" 
    2827#include "version.h" 
  • lm-sensors/trunk/kernel/chips/adm9240.c

    r492 r496  
    5555#include <asm/io.h> 
    5656#include <linux/types.h> 
    57 #include "smbus.h" 
     57#include <linux/i2c.h> 
    5858#include "version.h" 
    5959#include "i2c-isa.h" 
    6060#include "sensors.h" 
    61 #include "i2c.h" 
    6261#include "compat.h" 
    6362 
  • lm-sensors/trunk/kernel/chips/bt869.c

    r467 r496  
    2424#include <linux/module.h> 
    2525#include <linux/malloc.h> 
    26 #include "smbus.h" 
     26#include <linux/i2c.h> 
    2727#include "sensors.h" 
    28 #include "i2c.h" 
    2928#include "i2c-isa.h" 
    3029#include "version.h" 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r467 r496  
    2222#include <linux/module.h> 
    2323#include <linux/malloc.h> 
    24 #include "smbus.h" 
     24#include <linux/i2c.h> 
    2525#include "sensors.h" 
    26 #include "i2c.h" 
    2726#include "i2c-isa.h" 
    2827#include "version.h" 
  • lm-sensors/trunk/kernel/chips/gl518sm.c

    r484 r496  
    2323#include <linux/module.h> 
    2424#include <linux/malloc.h> 
    25 #include "smbus.h" 
     25#include <linux/i2c.h> 
    2626#include "sensors.h" 
    27 #include "i2c.h" 
    2827#include "version.h" 
    2928#include "compat.h" 
  • lm-sensors/trunk/kernel/chips/icspll.c

    r467 r496  
    3131#include <linux/module.h> 
    3232#include <linux/malloc.h> 
    33 #include "smbus.h" 
     33#include <linux/i2c.h> 
    3434#include "sensors.h" 
    35 #include "i2c.h" 
    3635#include "i2c-isa.h" 
    3736#include "version.h" 
  • lm-sensors/trunk/kernel/chips/lm75.c

    r467 r496  
    2121#include <linux/module.h> 
    2222#include <linux/malloc.h> 
    23 #include "smbus.h" 
     23#include <linux/i2c.h> 
    2424#include "sensors.h" 
    25 #include "i2c.h" 
    2625#include "i2c-isa.h" 
    2726#include "version.h" 
  • lm-sensors/trunk/kernel/chips/lm78.c

    r467 r496  
    2727#include <asm/io.h> 
    2828#include <linux/types.h> 
    29 #include "smbus.h" 
     29#include <linux/i2c.h> 
    3030#include "version.h" 
    3131#include "i2c-isa.h" 
    3232#include "sensors.h" 
    33 #include "i2c.h" 
    3433#include "compat.h" 
    3534 
  • lm-sensors/trunk/kernel/chips/lm80.c

    r467 r496  
    2828#include <asm/io.h> 
    2929#include <linux/types.h> 
    30 #include "smbus.h" 
     30#include <linux/i2c.h> 
    3131#include "version.h" 
    3232#include "i2c-isa.h" 
    3333#include "sensors.h" 
    34 #include "i2c.h" 
    3534#include "compat.h" 
    3635 
  • lm-sensors/trunk/kernel/chips/ltc1710.c

    r467 r496  
    4444#include <linux/module.h> 
    4545#include <linux/malloc.h> 
    46 #include "smbus.h" 
     46#include <linux/i2c.h> 
    4747#include "sensors.h" 
    48 #include "i2c.h" 
    4948#include "i2c-isa.h" 
    5049#include "version.h" 
  • lm-sensors/trunk/kernel/chips/matorb.c

    r482 r496  
    2525#include <linux/module.h> 
    2626#include <linux/malloc.h> 
    27 #include "smbus.h" 
     27#include <linux/i2c.h> 
    2828#include "sensors.h" 
    29 #include "i2c.h" 
    3029#include "i2c-isa.h" 
    3130#include "version.h" 
  • lm-sensors/trunk/kernel/chips/maxilife.c

    r467 r496  
    4747#include <asm/io.h> 
    4848#include <linux/types.h> 
    49 #include "smbus.h" 
     49#include <linux/i2c.h> 
    5050#include "version.h" 
    5151#include "sensors.h" 
    52 #include "i2c.h" 
    5352#include "compat.h" 
    5453 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r493 r496  
    3333#include <asm/io.h> 
    3434#include <linux/types.h> 
    35 #include "smbus.h" 
     35#include <linux/i2c.h> 
    3636#include "version.h" 
    3737#include "i2c-isa.h" 
    3838#include "sensors.h" 
    39 #include "i2c.h" 
    4039#include "compat.h" 
    4140 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r472 r496  
    3939#include <asm/io.h> 
    4040#include <linux/types.h> 
    41 #include "smbus.h" 
     41#include <linux/i2c.h> 
    4242#include "version.h" 
    4343#include "i2c-isa.h" 
    4444#include "sensors.h" 
    45 #include "i2c.h" 
    4645#include "compat.h" 
    4746 
  • lm-sensors/trunk/kernel/include/Module.mk

    r207 r496  
    2121MODULE_DIR := kernel/include 
    2222 
    23 KERNELINCLUDEFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/i2c-isa.h \ 
    24                       $(MODULE_DIR)/smbus.h $(MODULE_DIR)/i2c-dev.h 
     23KERNELINCLUDEFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/i2c-isa.h  
     24                       
    2525 
    2626install-all-kernel-include: 
    2727        $(MKDIR) $(SYSINCLUDEDIR) 
    28         for file in $(KERNELINCLUDEFILES) ; do \ 
    29           $(RM) $$file.install; \ 
    30           $(GREP) -v '/\* TBD \*/' $$file > $$file.install; \ 
    31           $(INSTALL) -o root -g root -m 644 $$file.install \ 
    32                     $(SYSINCLUDEDIR)/`basename $$file`; \ 
    33           $(RM) $$file.install; \ 
    34         done 
     28        $(INSTALL) -o root -g root -m 644 $(KERNELINCLUDEFILES) $(SYSINCLUDEDIR) 
     29 
    3530install :: install-all-kernel-include 
    3631 
  • lm-sensors/trunk/kernel/include/i2c-isa.h

    r477 r496  
    1818    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    1919*/ 
    20  
    21 /* Important note: */                                           /* TBD */ 
    22 /* Lines like these, with the 'TBD' remark (To Be Deleted) */   /* TBD */ 
    23 /* WILL BE DELETED when this file is installed. */              /* TBD */ 
    24 /* This allows us to get rid of the ugly LM_SENSORS define */   /* TBD */ 
    2520 
    2621 
     
    4742#endif 
    4843 
    49 #ifdef LM_SENSORS                                       /* TBD */ 
    50 #include "i2c.h"                                        /* TBD */ 
    51 #else /* ndef LM_SENSORS */                             /* TBD */ 
    52 #include <linux/i2c.h> 
    53 #endif /* def LM_SENSORS */                             /* TBD */ 
     44#include <linux/i2c.h>                   
    5445 
    5546/* Note that this driver is *not* built upon smbus.c, but is parallel to it. 
  • lm-sensors/trunk/kernel/include/sensors.h

    r484 r496  
    1818    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
    1919*/ 
    20  
    21 /* Important note: */                                           /* TBD */ 
    22 /* Lines like these, with the 'TBD' remark (To Be Deleted) */   /* TBD */ 
    23 /* WILL BE DELETED when this file is installed. */              /* TBD */ 
    24 /* This allows us to get rid of the ugly LM_SENSORS define */   /* TBD */ 
    25  
    2620 
    2721#ifndef SENSORS_SENSORS_H 
  • lm-sensors/trunk/kernel/sensors.c

    r338 r496  
    2626 
    2727#include "version.h" 
    28 #include "i2c.h" 
     28#include <linux/i2c.h> 
    2929#include "i2c-isa.h" 
    3030#include "sensors.h" 
    3131#include "compat.h" 
    32 #include "smbus.h" 
    3332 
    3433 
  • lm-sensors/trunk/prog/detect/i2cdetect.c

    r176 r496  
    2525#include <unistd.h> 
    2626#include <fcntl.h> 
    27 #include "kernel/include/i2c-dev.h" 
     27#include <linux/i2c-dev.h> 
    2828 
    2929void help(void) 
  • lm-sensors/trunk/prog/dump/i2cdump.c

    r176 r496  
    2424#include <unistd.h> 
    2525#include <fcntl.h> 
    26 #include "kernel/include/i2c-dev.h" 
     26#include <linux/i2c-dev.h> 
    2727 
    2828void help(void)