Changeset 3527

Show
Ignore:
Timestamp:
02/04/01 23:21:19 (12 years ago)
Author:
mds
Message:

Copy sensors.c and sensors.h from the lm_sensors package and

name them i2c-proc.c and i2c-proc.h.
Add DEVICEID's from sensors.h to i2c-id.h.
Add #defines from i2c-isa.h in lm_sensors to i2c.h.
Update mkpatch for i2c-proc.[ch].

Location:
i2c/trunk
Files:
2 added
8 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/kernel/Makefile

    r3485 r3527  
    44CURRENT=$(shell uname -r) 
    55I2CINCLUDES := i2c.h i2c-dev.h i2c-algo-bit.h i2c-algo-pcf.h \ 
    6                i2c-elektor.h i2c-pcf8584.h i2c-id.h 
     6               i2c-elektor.h i2c-pcf8584.h i2c-id.h i2c-proc.h 
    77I2CKERNELDIR := /usr/include/linux 
    88I2CMODDIR := /lib/modules/$(CURRENT)/misc 
     
    1313 
    1414MOD_SUB_DIRS = 
    15 MX_OBJS       = i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o 
     15MX_OBJS       = i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o i2c-proc.o 
    1616 
    1717M_OBJS      = i2c-dev.o i2c-philips-par.o i2c-elv.o i2c-velleman.o i2c-elektor.o 
     
    3535        insmod bit-lp.o base=0x278 
    3636        insmod i2c-dev.o 
    37         insmod drivers/eeprom.o test=1 
     37        insmod i2c-proc.o 
    3838 
    3939down: 
    40         -rmmod eeprom 
     40        -rmmod i2c-proc.o 
    4141        -rmmod i2c-dev 
    4242        -rmmod bit-lp 
  • i2c/trunk/kernel/Module.mk

    r3426 r3527  
    5757KERNELINCLUDES += $(MODULE_DIR)/i2c-elektor.h $(MODULE_DIR)/i2c-pcf8584.h 
    5858endif 
     59ifneq ($(shell if grep -q '^CONFIG_I2C_PROC=y' $(LINUX)/.config; then echo 1; fi),1) 
     60KERNELTARGETS += $(MODULE_DIR)/i2c-proc.o 
     61KERNELINCLUDES += $(MODULE_DIR)/i2c-proc.h 
     62endif 
    5963 
    6064# Include all dependency files 
  • i2c/trunk/kernel/i2c-id.h

    r3520 r3527  
    9494#define I2C_DRIVERID_I2CPROC    901 
    9595 
     96/* IDs --   Use DRIVERIDs 1000-1999 for sensors.  
     97   These were originally in sensors.h in the lm_sensors package */ 
     98#define I2C_DRIVERID_LM78 1002 
     99#define I2C_DRIVERID_LM75 1003 
     100#define I2C_DRIVERID_GL518 1004 
     101#define I2C_DRIVERID_EEPROM 1005 
     102#define I2C_DRIVERID_W83781D 1006 
     103#define I2C_DRIVERID_LM80 1007 
     104#define I2C_DRIVERID_ADM1021 1008 
     105#define I2C_DRIVERID_ADM9240 1009 
     106#define I2C_DRIVERID_LTC1710 1010 
     107#define I2C_DRIVERID_SIS5595 1011 
     108#define I2C_DRIVERID_ICSPLL 1012 
     109#define I2C_DRIVERID_BT869 1013 
     110#define I2C_DRIVERID_MAXILIFE 1014 
     111#define I2C_DRIVERID_MATORB 1015 
     112#define I2C_DRIVERID_GL520 1016 
     113#define I2C_DRIVERID_THMC50 1017 
     114#define I2C_DRIVERID_DDCMON 1018 
     115#define I2C_DRIVERID_VIA686A 1019 
     116#define I2C_DRIVERID_ADM1025 1020 
     117#define I2C_DRIVERID_LM87 1021 
     118#define I2C_DRIVERID_PCF8574 1022 
     119#define I2C_DRIVERID_MTP008 1023 
     120#define I2C_DRIVERID_DS1621 1024 
     121 
    96122/* 
    97123 * ---- Adapter types ---------------------------------------------------- 
  • i2c/trunk/kernel/i2c.h

    r3501 r3527  
    550550                                        force} 
    551551 
     552/* Detect whether we are on the isa bus. If this returns true, all i2c 
     553   access will fail! */ 
     554#define i2c_is_isa_client(clientptr) \ 
     555        ((clientptr)->adapter->algo->id == I2C_ALGO_ISA) 
     556#define i2c_is_isa_adapter(adapptr) \ 
     557        ((adapptr)->algo->id == I2C_ALGO_ISA) 
     558 
    552559#endif /* def __KERNEL__ */ 
    553560#endif /* I2C_H */ 
  • i2c/trunk/mkpatch/Config.in

    r3490 r3527  
    2626   dep_tristate 'I2C device interface' CONFIG_I2C_CHARDEV $CONFIG_I2C 
    2727 
     28   dep_tristate 'I2C /proc interface' CONFIG_I2C_PROC $CONFIG_I2C 
     29 
    2830fi 
    2931endmenu 
  • i2c/trunk/mkpatch/FILES

    r3501 r3527  
    77kernel/i2c-philips-par.c        drivers/i2c/i2c-philips-par.c 
    88kernel/i2c-velleman.c           drivers/i2c/i2c-velleman.c 
     9kernel/i2c-proc.c               drivers/i2c/i2c-proc.c 
    910kernel/i2c-pcf8584.h            drivers/i2c/i2c-pcf8584.h 
    1011kernel/i2c.h                    include/linux/i2c.h 
     
    1415kernel/i2c-elektor.h            include/linux/i2c-elektor.h 
    1516kernel/i2c-id.h                 include/linux/i2c-id.h 
     17kernel/i2c-proc.h               include/linux/i2c-proc.h 
    1618mkpatch/Config.in               drivers/i2c/Config.in 
    1719doc/proc-interface              Documentation/i2c/proc-interface 
  • i2c/trunk/mkpatch/INCLUDES

    r3410 r3527  
    55"i2c-elektor.h"         <linux/i2c-elektor.h> 
    66"i2c-id.h"              <linux/i2c-id.h> 
     7"i2c-proc.h"            <linux/i2c-proc.h> 
  • i2c/trunk/mkpatch/mkpatch.pl

    r3523 r3527  
    258258  module will be called i2c-dev.o. 
    259259 
     260I2C /proc support 
     261CONFIG_I2C_PROC 
     262  This provides support for i2c device entries in the /proc filesystem. 
     263  The entries will be found in /proc/sys/dev/sensors. 
     264 
     265  This code is also available as a module. If you want to compile 
     266  it as a module, say M here and read Documentation/modules.txt. The 
     267  module will be called i2c-dev.o. 
     268 
    260269EOF 
    261270      $printed = 1; 
     
    506515  ifeq ($(CONFIG_I2C_CHARDEV),m) 
    507516    M_OBJS += i2c-dev.o 
     517  endif 
     518endif 
     519 
     520ifeq ($(CONFIG_I2C_PROC),y) 
     521  L_OBJS += i2c-proc.o 
     522else 
     523  ifeq ($(CONFIG_I2C_PROC),m) 
     524    M_OBJS += i2c-proc.o 
    508525  endif 
    509526endif