Changeset 15

Show
Ignore:
Timestamp:
11/27/98 01:26:51 (14 years ago)
Author:
frodo
Message:

Start of i2c-bus, a module for displaying i2c bus information in /proc

Nothing much here yet, except some code to create /proc/bus/i2c. Should work
for kernels 2.0 and 2.1 (please test).

Other notable things:

printk statements in all modules made to have to same 'look'.

Location:
lm-sensors/trunk
Files:
4 added
9 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/Module.mk

    r13 r15  
    2424# defined value verbatim into the command-list of rules... 
    2525SRCTARGETS := $(MODULE_DIR)/smbus.o $(MODULE_DIR)/piix4.o $(MODULE_DIR)/isa.o \ 
    26               $(MODULE_DIR)/lm78.o 
     26              $(MODULE_DIR)/lm78.o $(MODULE_DIR)/i2c-bus.o 
    2727 
    2828# Include all dependency files 
  • lm-sensors/trunk/kernel/busses/i2c-isa.c

    r12 r15  
    7676                     int num) 
    7777{ 
    78   printk("isa_master_xfer called for adapter `%s' " 
     78  printk("isa.o: isa_master_xfer called for adapter `%s' " 
    7979         "(no i2c level access possible!)\n", 
    8080         adap->name); 
     
    8585int isa_slave_send (struct isa_adapter *adap, char *data, int len) 
    8686{ 
    87   printk("isa_slave_send called for adapter `%s' " 
     87  printk("isa.o: isa_slave_send called for adapter `%s' " 
    8888         "(no i2c level access possible!)\n", 
    8989         adap->name); 
     
    9494int isa_slave_recv (struct isa_adapter *adap, char *data, int len) 
    9595{ 
    96   printk("isa_slave_recv called for adapter `%s' " 
     96  printk("isa.o: isa_slave_recv called for adapter `%s' " 
    9797         "(no i2c level access possible!)\n", 
    9898         adap->name); 
     
    132132  isa_initialized = 0; 
    133133  if ((res = isa_add_algorithm(&isa_algorithm))) { 
    134     printk("isa.o: Algorithm registration failed, module isa.o not inserted\n"); 
     134    printk("isa.o: Algorithm registration failed, module not inserted.\n"); 
    135135    isa_cleanup(); 
    136136    return res; 
     
    142142  if ((res = isa_add_adapter(&isa_adapter))) { 
    143143    printk("isa.o: Adapter registration failed, " 
    144            "module isa.o is not inserted\n"); 
     144           "module isa.o is not inserted\n."); 
    145145    isa_cleanup(); 
    146146    return res; 
    147147  } 
    148148  isa_initialized++; 
    149   printk("isa.o: ISA bus access for i2c modules initialized\n"); 
     149  printk("isa.o: ISA bus access for i2c modules initialized.\n"); 
    150150  return 0; 
    151151} 
     
    157157  { 
    158158    if ((res = isa_del_adapter(&isa_adapter))) { 
    159       printk("isa.o: isa_del_adapter failed, module not removed\n"); 
     159      printk("isa.o: Adapter deregistration failed, module not removed.\n"); 
    160160      return res; 
    161161    } else 
     
    165165  { 
    166166    if ((res = isa_del_algorithm(&isa_algorithm))) { 
    167       printk("isa.o: isa_del_algorithm failed, module not removed\n"); 
     167      printk("isa.o: Algorithm deregistration failed, module not removed.\n"); 
    168168      return res; 
    169169    } else 
  • lm-sensors/trunk/kernel/busses/i2c-piix4.c

    r13 r15  
    6666  piix4_initialized = 0; 
    6767  if ((res = piix4_setup())) { 
    68     printk("piix4.o: PIIX4 not detected, module not inserted\n"); 
     68    printk("piix4.o: PIIX4 not detected, module not inserted.\n"); 
    6969    piix4_cleanup(); 
    7070    return res; 
     
    7676  piix4_adapter.smbus_access = &piix4_access; 
    7777  if ((res = smbus_add_adapter(&piix4_adapter))) { 
    78     printk("piix4.o: smbus_add_adapter failed, module not inserted\n"); 
     78    printk("piix4.o: Adapter registration failed, module not inserted.\n"); 
    7979    piix4_cleanup(); 
    8080    return res; 
  • lm-sensors/trunk/kernel/smbus.c

    r13 r15  
    115115                       int num) 
    116116{ 
    117   printk("smbus_master_xfer called for adapter `%s' " 
     117  printk("smbus.o: smbus_master_xfer called for adapter `%s' " 
    118118         "(no i2c level access possible!)\n", 
    119119         adap->name); 
     
    124124int smbus_slave_send (struct smbus_adapter *adap, char *data, int len) 
    125125{ 
    126   printk("smbus_slave_send called for adapter `%s' " 
     126  printk("smbus.o: smbus_slave_send called for adapter `%s' " 
    127127         "(no i2c level access possible!)\n", 
    128128         adap->name); 
     
    133133int smbus_slave_recv (struct smbus_adapter *adap, char *data, int len) 
    134134{ 
    135   printk("smbus_slave_recv called for adapter `%s' " 
     135  printk("smbus.o: smbus_slave_recv called for adapter `%s' " 
    136136         "(no i2c level access possible!)\n", 
    137137         adap->name); 
     
    164164  printk("smbus.o version %s (%s)\n",LM_VERSION,LM_DATE); 
    165165  if ((res = smbus_add_algorithm(&smbus_algorithm))) 
    166     printk("Module smbus.o not inserted!\n"); 
     166    printk("smbus.o: Algorithm registration failed, module not inserted.\n"); 
    167167  else 
    168168    printk("smbus.o initialized\n"); 
     
    174174  int res; 
    175175  if ((res = smbus_del_algorithm(&smbus_algorithm))) 
    176     printk("Module smbus.o could not be removed cleanly!\n"); 
     176    printk("smbus.o: Algorithm deregistration failed, module not removed\n"); 
    177177  return res; 
    178178} 
  • lm-sensors/trunk/src/Module.mk

    r13 r15  
    2424# defined value verbatim into the command-list of rules... 
    2525SRCTARGETS := $(MODULE_DIR)/smbus.o $(MODULE_DIR)/piix4.o $(MODULE_DIR)/isa.o \ 
    26               $(MODULE_DIR)/lm78.o 
     26              $(MODULE_DIR)/lm78.o $(MODULE_DIR)/i2c-bus.o 
    2727 
    2828# Include all dependency files 
  • lm-sensors/trunk/src/isa.c

    r12 r15  
    7676                     int num) 
    7777{ 
    78   printk("isa_master_xfer called for adapter `%s' " 
     78  printk("isa.o: isa_master_xfer called for adapter `%s' " 
    7979         "(no i2c level access possible!)\n", 
    8080         adap->name); 
     
    8585int isa_slave_send (struct isa_adapter *adap, char *data, int len) 
    8686{ 
    87   printk("isa_slave_send called for adapter `%s' " 
     87  printk("isa.o: isa_slave_send called for adapter `%s' " 
    8888         "(no i2c level access possible!)\n", 
    8989         adap->name); 
     
    9494int isa_slave_recv (struct isa_adapter *adap, char *data, int len) 
    9595{ 
    96   printk("isa_slave_recv called for adapter `%s' " 
     96  printk("isa.o: isa_slave_recv called for adapter `%s' " 
    9797         "(no i2c level access possible!)\n", 
    9898         adap->name); 
     
    132132  isa_initialized = 0; 
    133133  if ((res = isa_add_algorithm(&isa_algorithm))) { 
    134     printk("isa.o: Algorithm registration failed, module isa.o not inserted\n"); 
     134    printk("isa.o: Algorithm registration failed, module not inserted.\n"); 
    135135    isa_cleanup(); 
    136136    return res; 
     
    142142  if ((res = isa_add_adapter(&isa_adapter))) { 
    143143    printk("isa.o: Adapter registration failed, " 
    144            "module isa.o is not inserted\n"); 
     144           "module isa.o is not inserted\n."); 
    145145    isa_cleanup(); 
    146146    return res; 
    147147  } 
    148148  isa_initialized++; 
    149   printk("isa.o: ISA bus access for i2c modules initialized\n"); 
     149  printk("isa.o: ISA bus access for i2c modules initialized.\n"); 
    150150  return 0; 
    151151} 
     
    157157  { 
    158158    if ((res = isa_del_adapter(&isa_adapter))) { 
    159       printk("isa.o: isa_del_adapter failed, module not removed\n"); 
     159      printk("isa.o: Adapter deregistration failed, module not removed.\n"); 
    160160      return res; 
    161161    } else 
     
    165165  { 
    166166    if ((res = isa_del_algorithm(&isa_algorithm))) { 
    167       printk("isa.o: isa_del_algorithm failed, module not removed\n"); 
     167      printk("isa.o: Algorithm deregistration failed, module not removed.\n"); 
    168168      return res; 
    169169    } else 
  • lm-sensors/trunk/src/piix4.c

    r13 r15  
    6666  piix4_initialized = 0; 
    6767  if ((res = piix4_setup())) { 
    68     printk("piix4.o: PIIX4 not detected, module not inserted\n"); 
     68    printk("piix4.o: PIIX4 not detected, module not inserted.\n"); 
    6969    piix4_cleanup(); 
    7070    return res; 
     
    7676  piix4_adapter.smbus_access = &piix4_access; 
    7777  if ((res = smbus_add_adapter(&piix4_adapter))) { 
    78     printk("piix4.o: smbus_add_adapter failed, module not inserted\n"); 
     78    printk("piix4.o: Adapter registration failed, module not inserted.\n"); 
    7979    piix4_cleanup(); 
    8080    return res; 
  • lm-sensors/trunk/src/smbus.c

    r13 r15  
    115115                       int num) 
    116116{ 
    117   printk("smbus_master_xfer called for adapter `%s' " 
     117  printk("smbus.o: smbus_master_xfer called for adapter `%s' " 
    118118         "(no i2c level access possible!)\n", 
    119119         adap->name); 
     
    124124int smbus_slave_send (struct smbus_adapter *adap, char *data, int len) 
    125125{ 
    126   printk("smbus_slave_send called for adapter `%s' " 
     126  printk("smbus.o: smbus_slave_send called for adapter `%s' " 
    127127         "(no i2c level access possible!)\n", 
    128128         adap->name); 
     
    133133int smbus_slave_recv (struct smbus_adapter *adap, char *data, int len) 
    134134{ 
    135   printk("smbus_slave_recv called for adapter `%s' " 
     135  printk("smbus.o: smbus_slave_recv called for adapter `%s' " 
    136136         "(no i2c level access possible!)\n", 
    137137         adap->name); 
     
    164164  printk("smbus.o version %s (%s)\n",LM_VERSION,LM_DATE); 
    165165  if ((res = smbus_add_algorithm(&smbus_algorithm))) 
    166     printk("Module smbus.o not inserted!\n"); 
     166    printk("smbus.o: Algorithm registration failed, module not inserted.\n"); 
    167167  else 
    168168    printk("smbus.o initialized\n"); 
     
    174174  int res; 
    175175  if ((res = smbus_del_algorithm(&smbus_algorithm))) 
    176     printk("Module smbus.o could not be removed cleanly!\n"); 
     176    printk("smbus.o: Algorithm deregistration failed, module not removed\n"); 
    177177  return res; 
    178178} 
  • lm-sensors/trunk/version.h

    r12 r15  
    1 #define LM_DATE "19981122" 
    2 #define LM_VERSION "2.0.0pre1" 
     1#define LM_DATE "19981127" 
     2#define LM_VERSION "2.0.0pre2"