Changeset 584

Show
Ignore:
Timestamp:
09/27/99 16:19:46 (14 years ago)
Author:
frodo
Message:

`functionality' checking for clients implemented

Location:
lm-sensors/trunk/kernel
Files:
16 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/chips/adm1021.c

    r582 r584  
    208208#endif 
    209209 
     210  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     211    goto ERROR0; 
    210212 
    211213  /* We need address registration for the I2C bus too. That is not yet 
  • lm-sensors/trunk/kernel/chips/adm9240.c

    r582 r584  
    362362#endif 
    363363 
     364  if (i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     365    goto ERROR0; 
     366 
    364367  /* We need address registration for the I2C bus too. That is not yet 
    365368     implemented. */ 
  • lm-sensors/trunk/kernel/chips/bt869.c

    r582 r584  
    179179#endif 
    180180 
     181  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_READ_BYTE|  
     182                                        I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) 
     183    goto ERROR0; 
     184 
    181185  /* Here, we have to do the address registration check for the I2C bus. 
    182186     But that is not yet implemented. */ 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r582 r584  
    173173  } 
    174174#endif 
     175 
     176  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA |  
     177                                        I2C_FUNC_SMBUS_WRITE_WORD_DATA)) 
     178    goto ERROR0; 
    175179 
    176180  /* Here, we have to do the address registration check for the I2C bus. 
  • lm-sensors/trunk/kernel/chips/gl518sm.c

    r563 r584  
    304304#endif 
    305305 
     306  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA |  
     307                                        I2C_FUNC_SMBUS_WORD_DATA)) 
     308    goto ERROR0; 
    306309 
    307310  /* We need address registration for the I2C bus too. That is not yet 
  • lm-sensors/trunk/kernel/chips/gl520sm.c

    r582 r584  
    306306#endif 
    307307 
     308  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA| 
     309                                        I2C_FUNC_SMBUS_WORD_DATA)) 
     310    goto ERROR0; 
    308311 
    309312  /* We need address registration for the I2C bus too. That is not yet 
  • lm-sensors/trunk/kernel/chips/lm75.c

    r582 r584  
    152152  } 
    153153#endif 
     154 
     155  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA | 
     156                                        I2C_FUNC_SMBUS_WORD_DATA)) 
     157    goto ERROR0; 
    154158 
    155159  /* Here, we have to do the address registration check for the I2C bus. 
  • lm-sensors/trunk/kernel/chips/lm78.c

    r582 r584  
    314314  int is_isa = i2c_is_isa_adapter(adapter); 
    315315 
     316  if (!is_isa && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     317    goto ERROR0; 
     318 
    316319  /* We need address registration for the I2C bus too. That is not yet 
    317320     implemented. */ 
  • lm-sensors/trunk/kernel/chips/lm80.c

    r582 r584  
    300300#endif 
    301301 
     302  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     303    goto ERROR0; 
     304 
    302305  /* Here, we have to do the address registration check for the I2C bus. 
    303306     But that is not yet implemented. */ 
  • lm-sensors/trunk/kernel/chips/ltc1710.c

    r582 r584  
    167167#endif 
    168168 
     169  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE)) 
     170    goto ERROR0; 
     171 
    169172  /* Here, we have to do the address registration check for the I2C bus. 
    170173     But that is not yet implemented. */ 
  • lm-sensors/trunk/kernel/chips/matorb.c

    r582 r584  
    139139#endif 
    140140 
     141  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_WRITE_BYTE | 
     142                                        I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) 
     143    goto ERROR0; 
     144 
     145 
    141146  /* Here, we have to do the address registration check for the I2C bus. 
    142147     But that is not yet implemented. */ 
  • lm-sensors/trunk/kernel/chips/maxilife.c

    r582 r584  
    5050#include "version.h" 
    5151#include "sensors.h" 
     52#include "i2c-isa.h" 
    5253#include "compat.h" 
    5354 
     
    265266int maxi_attach_adapter(struct i2c_adapter *adapter) 
    266267{ 
    267    return maxi_detect_smbus(adapter); 
     268   if (i2c_is_isa_adapter(adapter)) 
     269     return 0; 
     270   else 
     271     return maxi_detect_smbus(adapter); 
    268272} 
    269273 
     
    289293   /* OK, this is no detection. I know. It will do for now, though. */ 
    290294   err = 0; 
     295 
     296   if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     297     goto ERROR0; 
     298 
    291299   for (address = 0x10; (! err) && (address <= 0x14); address++) { 
    292300 
     
    376384      kfree(new_client); 
    377385   } 
     386ERROR0: 
    378387   return err; 
    379388} 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r582 r584  
    313313  const char *client_name = ""; 
    314314 
    315   /* Make sure we are probing the ISA bus!! This is just a safety check 
    316      at this moment; sensors_detect really won't call us for I2C busses. */ 
    317 #ifdef DEBUG 
     315  /* Make sure we are probing the ISA bus!!  */ 
    318316  if (!i2c_is_isa_adapter(adapter)) { 
    319317    printk("sis5595.o: sis5595_detect called for an I2C bus adapter?!?\n"); 
    320318    return 0; 
    321319  } 
    322 #endif 
    323320 
    324321  if (check_region(address,SIS5595_EXTENT)) 
  • lm-sensors/trunk/kernel/chips/thmc50.c

    r582 r584  
    199199#endif 
    200200 
     201  if (! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     202    goto ERROR0; 
     203 
    201204  /* Here, we have to do the address registration check for the I2C bus. 
    202205     But that is not yet implemented. */ 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r582 r584  
    646646  int is_isa = i2c_is_isa_adapter(adapter); 
    647647 
     648  if (!is_isa && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_BYTE_DATA)) 
     649    goto ERROR0; 
     650 
    648651  /* We need address registration for the I2C bus too. That is not yet 
    649652     implemented. */ 
  • lm-sensors/trunk/kernel/sensors.c

    r535 r584  
    595595  int adapter_id = is_isa?SENSORS_ISA_BUS:i2c_adapter_id(adapter); 
    596596 
     597  /* Forget it if we can't probe using SMBUS_QUICK */ 
     598  if ((! is_isa) && ! i2c_check_functionality(adapter,I2C_FUNC_SMBUS_QUICK)) 
     599    return -1; 
     600 
    597601  for (addr = 0x00;  
    598602       addr <= (is_isa?0xffff:0x7f);