Changeset 499

Show
Ignore:
Timestamp:
07/21/99 00:46:49 (14 years ago)
Author:
kmalkki
Message:

(Kyösti)

  • renamed every smbus_* access to i2c_smbus_*
  • everything in lm_sensors2/kernel/* compiles nicely :)
Location:
lm-sensors/trunk/kernel
Files:
15 modified

Legend:

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

    r496 r499  
    129129  /* name */            "adm1021, MAX1617 sensor driver", 
    130130  /* id */              I2C_DRIVERID_ADM1021, 
    131   /* flags */           DF_NOTIFY, 
     131  /* flags */           I2C_DF_NOTIFY, 
    132132  /* attach_adapter */  &adm1021_attach_adapter, 
    133133  /* detach_client */   &adm1021_detach_client, 
     
    374374int adm1021_read_value(struct i2c_client *client, u8 reg) 
    375375{ 
    376     return smbus_read_byte_data(client->adapter,client->addr,reg); 
     376    return i2c_smbus_read_byte_data(client->adapter,client->addr,reg); 
    377377} 
    378378 
    379379int adm1021_write_value(struct i2c_client *client, u8 reg, u16 value) 
    380380{ 
    381     return smbus_write_byte_data(client->adapter,client->addr,reg,value); 
     381    return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 
    382382} 
    383383 
  • lm-sensors/trunk/kernel/chips/adm9240.c

    r496 r499  
    277277  /* name */            "ADM9240 sensor driver", 
    278278  /* id */              I2C_DRIVERID_ADM9240, 
    279   /* flags */           DF_NOTIFY, 
     279  /* flags */           I2C_DF_NOTIFY, 
    280280  /* attach_adapter */  &adm9240_attach_adapter, 
    281281  /* detach_client */   &adm9240_detach_client, 
     
    502502int adm9240_read_value(struct i2c_client *client, u8 reg) 
    503503{ 
    504   return 0xFF & smbus_read_byte_data(client->adapter,client->addr, reg); 
     504  return 0xFF & i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 
    505505} 
    506506 
    507507int adm9240_write_value(struct i2c_client *client, u8 reg, u8 value) 
    508508{ 
    509   return smbus_write_byte_data(client->adapter, client->addr, reg,value); 
     509  return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value); 
    510510} 
    511511 
  • lm-sensors/trunk/kernel/chips/bt869.c

    r496 r499  
    108108  /* name */            "BT869 video-output chip driver", 
    109109  /* id */              I2C_DRIVERID_BT869, 
    110   /* flags */           DF_NOTIFY, 
     110  /* flags */           I2C_DF_NOTIFY, 
    111111  /* attach_adapter */  &bt869_attach_adapter, 
    112112  /* detach_client */   &bt869_detach_client, 
     
    192192 
    193193  /* Now, we do the remaining detection. It is lousy. */ 
    194   smbus_write_byte_data(new_client->adapter, 
     194  i2c_smbus_write_byte_data(new_client->adapter, 
    195195        new_client->addr,0xC4,0);         /* set status bank 0 */ 
    196   cur = smbus_read_byte(adapter,address); 
     196  cur = i2c_smbus_read_byte(adapter,address); 
    197197  printk("bt869.o: address 0x%X testing-->0x%X\n",address,cur); 
    198198  if ((cur | 0x20) != 0x22) 
     
    314314int bt869_read_value(struct i2c_client *client, u8 reg) 
    315315{ 
    316     return smbus_read_byte(client->adapter,client->addr); 
     316    return i2c_smbus_read_byte(client->adapter,client->addr); 
    317317} 
    318318 
     
    322322int bt869_write_value(struct i2c_client *client, u8 reg, u16 value) 
    323323{ 
    324     return smbus_write_byte_data(client->adapter,client->addr,reg,value); 
     324    return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 
    325325} 
    326326 
  • lm-sensors/trunk/kernel/chips/eeprom.c

    r496 r499  
    100100  /* name */            "EEPROM READER", 
    101101  /* id */              I2C_DRIVERID_EEPROM, 
    102   /* flags */           DF_NOTIFY, 
     102  /* flags */           I2C_DF_NOTIFY, 
    103103  /* attach_adapter */  &eeprom_attach_adapter, 
    104104  /* detach_client */   &eeprom_detach_client, 
     
    189189    cs = 0; 
    190190    for (i = 0; i <= 0x3e; i++) 
    191       cs += smbus_read_byte_data(adapter,address,i); 
     191      cs += i2c_smbus_read_byte_data(adapter,address,i); 
    192192    cs &= 0xff; 
    193     if (smbus_read_byte_data(adapter,address,EEPROM_REG_CHECKSUM) != cs) 
     193    if (i2c_smbus_read_byte_data(adapter,address,EEPROM_REG_CHECKSUM) != cs) 
    194194      goto ERROR1; 
    195195  } 
     
    308308{ 
    309309  if (reg == EEPROM_REG_CONF) 
    310     return smbus_write_byte_data(client->adapter,client->addr,reg,value); 
     310    return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 
    311311  else 
    312     return smbus_write_word_data(client->adapter,client->addr,reg,value); */ 
     312    return i2c_smbus_write_word_data(client->adapter,client->addr,reg,value); */ 
    313313     
    314314    return 0; 
     
    330330#endif 
    331331 
    332    if (smbus_write_byte(client->adapter,client->addr,0)) { 
     332   if (i2c_smbus_write_byte(client->adapter,client->addr,0)) { 
    333333#ifdef DEBUG 
    334334    printk("eeprom read start has failed!\n"); 
     
    336336   } 
    337337    for (i=0;i<EEPROM_SIZE;i++) { 
    338          data->data[i] = (u8)smbus_read_byte(client->adapter,client->addr); 
     338         data->data[i] = (u8)i2c_smbus_read_byte(client->adapter,client->addr); 
    339339    } 
    340340     
  • lm-sensors/trunk/kernel/chips/gl518sm.c

    r496 r499  
    212212  /* name */            "GL518SM sensor chip driver", 
    213213  /* id */              I2C_DRIVERID_GL518, 
    214   /* flags */           DF_NOTIFY, 
     214  /* flags */           I2C_DF_NOTIFY, 
    215215  /* attach_adapter */  &gl518_attach_adapter, 
    216216  /* detach_client */   &gl518_detach_client, 
     
    497497{ 
    498498  if ((reg >= 0x07) && (reg <= 0x0c))  
    499     return swap_bytes(smbus_read_word_data(client->adapter,client->addr,reg)); 
     499    return swap_bytes(i2c_smbus_read_word_data(client->adapter,client->addr,reg)); 
    500500  else 
    501     return smbus_read_byte_data(client->adapter,client->addr,reg); 
     501    return i2c_smbus_read_byte_data(client->adapter,client->addr,reg); 
    502502} 
    503503 
     
    508508{ 
    509509  if ((reg >= 0x07) && (reg <= 0x0c))  
    510     return smbus_write_word_data(client->adapter,client->addr,reg, 
     510    return i2c_smbus_write_word_data(client->adapter,client->addr,reg, 
    511511                                 swap_bytes(value)); 
    512512  else 
    513     return smbus_write_byte_data(client->adapter,client->addr,reg,value); 
     513    return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 
    514514} 
    515515 
  • lm-sensors/trunk/kernel/chips/icspll.c

    r496 r499  
    8282  /* name */            "ICS/PLL clock reader", 
    8383  /* id */              I2C_DRIVERID_ICSPLL, 
    84   /* flags */           DF_NOTIFY, 
     84  /* flags */           I2C_DF_NOTIFY, 
    8585  /* attach_adapter */  &icspll_attach_adapter, 
    8686  /* detach_client */   &icspll_detach_client, 
     
    138138     
    139139    /* these chips only support block transfers so use that for detection */ 
    140     if(smbus_read_block_data(adapter, address, 0x00, tempdata) < 0) { 
     140    if(i2c_smbus_read_block_data(adapter, address, 0x00, tempdata) < 0) { 
    141141#ifdef DEBUG 
    142142      printk("icspll.o: No icspll found at: 0x%X\n",address); 
     
    255255int icspll_write_value(struct i2c_client *client, u8 reg, u16 value) 
    256256{ 
    257   return smbus_write_block_data(client->adapter,client->addr,reg,value); 
     257  return i2c_smbus_write_block_data(client->adapter,client->addr,reg,value); 
    258258} 
    259259#endif 
     
    269269      (jiffies < data->last_updated) || ! data->valid) { 
    270270 
    271     len = smbus_read_block_data(client->adapter, client->addr, 0x00, tempdata); 
     271    len = i2c_smbus_read_block_data(client->adapter, client->addr, 0x00, tempdata); 
    272272#ifdef DEBUG 
    273273    printk("icspll.o: read returned %d values\n", len); 
  • lm-sensors/trunk/kernel/chips/lm75.c

    r496 r499  
    9393  /* name */            "LM75 sensor chip driver", 
    9494  /* id */              I2C_DRIVERID_LM75, 
    95   /* flags */           DF_NOTIFY, 
     95  /* flags */           I2C_DF_NOTIFY, 
    9696  /* attach_adapter */  &lm75_attach_adapter, 
    9797  /* detach_client */   &lm75_detach_client, 
     
    165165 
    166166  /* Now, we do the remaining detection. It is lousy. */ 
    167   cur = smbus_read_word_data(adapter,address,0); 
    168   conf = smbus_read_byte_data(adapter,address,1); 
    169   hyst = smbus_read_word_data(adapter,address,2); 
    170   os = smbus_read_word_data(adapter,address,3); 
     167  cur = i2c_smbus_read_word_data(adapter,address,0); 
     168  conf = i2c_smbus_read_byte_data(adapter,address,1); 
     169  hyst = i2c_smbus_read_word_data(adapter,address,2); 
     170  os = i2c_smbus_read_word_data(adapter,address,3); 
    171171  for (i = 0; i <= 0x1f; i++)  
    172     if ((smbus_read_byte_data(adapter,address,i*8+1) != conf) || 
    173         (smbus_read_word_data(adapter,address,i*8+2) != hyst) || 
    174         (smbus_read_word_data(adapter,address,i*8+3) != os)) 
     172    if ((i2c_smbus_read_byte_data(adapter,address,i*8+1) != conf) || 
     173        (i2c_smbus_read_word_data(adapter,address,i*8+2) != hyst) || 
     174        (i2c_smbus_read_word_data(adapter,address,i*8+3) != os)) 
    175175      goto ERROR1; 
    176176   
     
    297297{ 
    298298  if (reg == LM75_REG_CONF) 
    299     return smbus_read_byte_data(client->adapter,client->addr,reg); 
     299    return i2c_smbus_read_byte_data(client->adapter,client->addr,reg); 
    300300  else 
    301     return swap_bytes(smbus_read_word_data(client->adapter,client->addr,reg)); 
     301    return swap_bytes(i2c_smbus_read_word_data(client->adapter,client->addr,reg)); 
    302302} 
    303303 
     
    308308{ 
    309309  if (reg == LM75_REG_CONF) 
    310     return smbus_write_byte_data(client->adapter,client->addr,reg,value); 
     310    return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 
    311311  else 
    312     return smbus_write_word_data(client->adapter,client->addr,reg, 
     312    return i2c_smbus_write_word_data(client->adapter,client->addr,reg, 
    313313           swap_bytes(value)); 
    314314} 
  • lm-sensors/trunk/kernel/chips/lm78.c

    r496 r499  
    237237  /* name */            "LM78(-J) and LM79 sensor driver", 
    238238  /* id */              I2C_DRIVERID_LM78, 
    239   /* flags */           DF_NOTIFY, 
     239  /* flags */           I2C_DF_NOTIFY, 
    240240  /* attach_adapter */  &lm78_attach_adapter, 
    241241  /* detach_client */   &lm78_detach_client, 
     
    534534    return res; 
    535535  } else 
    536     return smbus_read_byte_data(client->adapter,client->addr, reg); 
     536    return i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 
    537537} 
    538538 
     
    553553    return 0; 
    554554  } else 
    555     return smbus_write_byte_data(client->adapter, client->addr, reg,value); 
     555    return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value); 
    556556} 
    557557 
  • lm-sensors/trunk/kernel/chips/lm80.c

    r496 r499  
    230230  /* name */            "LM80 sensor driver", 
    231231  /* id */              I2C_DRIVERID_LM80, 
    232   /* flags */           DF_NOTIFY, 
     232  /* flags */           I2C_DF_NOTIFY, 
    233233  /* attach_adapter */  &lm80_attach_adapter, 
    234234  /* detach_client */   &lm80_detach_client, 
     
    320320    goto ERROR1; 
    321321  for (i = 0x2a; i <= 0x3d; i++) { 
    322     cur = smbus_read_byte_data(adapter,address,i); 
    323     if ((smbus_read_byte_data(adapter,address,i+0x40) != cur) || 
    324         (smbus_read_byte_data(adapter,address,i+0x80) != cur) || 
    325         (smbus_read_byte_data(adapter,address,i+0xc0) != cur)) 
     322    cur = i2c_smbus_read_byte_data(adapter,address,i); 
     323    if ((i2c_smbus_read_byte_data(adapter,address,i+0x40) != cur) || 
     324        (i2c_smbus_read_byte_data(adapter,address,i+0x80) != cur) || 
     325        (i2c_smbus_read_byte_data(adapter,address,i+0xc0) != cur)) 
    326326      goto ERROR1; 
    327327  } 
     
    437437int lm80_read_value(struct i2c_client *client, u8 reg) 
    438438{ 
    439   return smbus_read_byte_data(client->adapter,client->addr, reg); 
     439  return i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 
    440440} 
    441441 
    442442int lm80_write_value(struct i2c_client *client, u8 reg, u8 value) 
    443443{ 
    444   return smbus_write_byte_data(client->adapter, client->addr, reg,value); 
     444  return i2c_smbus_write_byte_data(client->adapter, client->addr, reg,value); 
    445445} 
    446446 
  • lm-sensors/trunk/kernel/chips/ltc1710.c

    r496 r499  
    102102  /* name */            "LTC1710 sensor chip driver", 
    103103  /* id */              I2C_DRIVERID_LTC1710, 
    104   /* flags */           DF_NOTIFY, 
     104  /* flags */           I2C_DF_NOTIFY, 
    105105  /* attach_adapter */  &ltc1710_attach_adapter, 
    106106  /* detach_client */   &ltc1710_detach_client, 
     
    302302#endif 
    303303 
    304     /* data->status = smbus_read_byte(client->adapter,client->addr);  
     304    /* data->status = i2c_smbus_read_byte(client->adapter,client->addr);  
    305305        Unfortunately, reads always fail!  */ 
    306306    data->last_updated = jiffies; 
     
    325325    if (*nrels_mag >= 1) { 
    326326      data->status = (data->status & 2) | results[0]; 
    327       smbus_write_byte(client->adapter,client->addr,data->status); 
     327      i2c_smbus_write_byte(client->adapter,client->addr,data->status); 
    328328    } 
    329329  } 
     
    343343    if (*nrels_mag >= 1) { 
    344344      data->status = (data->status & 1) | (results[0] << 1); 
    345       smbus_write_byte(client->adapter,client->addr,data->status); 
     345      i2c_smbus_write_byte(client->adapter,client->addr,data->status); 
    346346    } 
    347347  } 
  • lm-sensors/trunk/kernel/chips/matorb.c

    r496 r499  
    7878  /* name */            "Matrix Orbital LCD driver", 
    7979  /* id */              I2C_DRIVERID_MATORB, 
    80   /* flags */           DF_NOTIFY, 
     80  /* flags */           I2C_DF_NOTIFY, 
    8181  /* attach_adapter */  &matorb_attach_adapter, 
    8282  /* detach_client */   &matorb_detach_client, 
     
    151151 
    152152  /* Now, we do the remaining detection. It is lousy. */ 
    153   cur = smbus_write_byte_data(adapter,address,0x0FE, 0x58); /* clear screen */ 
     153  cur = i2c_smbus_write_byte_data(adapter,address,0x0FE, 0x58); /* clear screen */ 
    154154   
    155155  printk("matorb.o: debug detect 0x%X\n",cur); 
     
    267267{ 
    268268  if (reg==0) { 
    269     return smbus_write_byte(client->adapter,client->addr,value); 
     269    return i2c_smbus_write_byte(client->adapter,client->addr,value); 
    270270  } else { 
    271     return smbus_write_byte_data(client->adapter,client->addr,reg,value); 
     271    return i2c_smbus_write_byte_data(client->adapter,client->addr,reg,value); 
    272272  } 
    273273} 
  • lm-sensors/trunk/kernel/chips/maxilife.c

    r496 r499  
    197197  /* name */            "HP MaxiLife driver", 
    198198  /* id */              I2C_DRIVERID_MAXILIFE, 
    199   /* flags */           DF_NOTIFY, 
     199  /* flags */           I2C_DF_NOTIFY, 
    200200  /* attach_adapter */  &maxi_attach_adapter, 
    201201  /* detach_client */   &maxi_detach_client, 
     
    285285         adapter, and check whether they are used here */ 
    286286 
    287       if (smbus_read_byte_data(adapter, address, MAXI_REG_LED_STATE) < 0)  
     287      if (i2c_smbus_read_byte_data(adapter, address, MAXI_REG_LED_STATE) < 0)  
    288288         continue; 
    289289 
     
    295295           "CO 00.03" -> Cognac [XU] 
    296296           "AS 00.01" -> Ashaki [XA] */ 
    297       biosctl = smbus_read_byte_data(adapter, address, MAXI_REG_BIOS_CTRL); 
    298       smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl|4); 
     297      biosctl = i2c_smbus_read_byte_data(adapter, address, MAXI_REG_BIOS_CTRL); 
     298      i2c_smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl|4); 
    299299      err = eeprom_read_byte_data(adapter, 0x54, 0x45); 
    300       smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl); 
     300      i2c_smbus_write_byte_data(adapter, address, MAXI_REG_BIOS_CTRL, biosctl); 
    301301#endif 
    302302 
     
    455455int maxi_read_value(struct i2c_client *client, u8 reg) 
    456456{ 
    457    return smbus_read_byte_data(client->adapter, client->addr, reg); 
     457   return i2c_smbus_read_byte_data(client->adapter, client->addr, reg); 
    458458} 
    459459 
     
    462462int maxi_write_value(struct i2c_client *client, u8 reg, u8 value) 
    463463{ 
    464    return smbus_write_byte_data(client->adapter, client->addr, reg, value); 
     464   return i2c_smbus_write_byte_data(client->adapter, client->addr, reg, value); 
    465465} 
    466466#endif 
  • lm-sensors/trunk/kernel/chips/sis5595.c

    r496 r499  
    216216  /* name */            "SiS 5595", 
    217217  /* id */              I2C_DRIVERID_SIS5595, 
    218   /* flags */           DF_NOTIFY, 
     218  /* flags */           I2C_DF_NOTIFY, 
    219219  /* attach_adapter */  &sis5595_attach_adapter, 
    220220  /* detach_client */   &sis5595_detach_client, 
  • lm-sensors/trunk/kernel/chips/w83781d.c

    r496 r499  
    403403  /* name */            "W83781D sensor driver", 
    404404  /* id */              I2C_DRIVERID_W83781D, 
    405   /* flags */           DF_NOTIFY, 
     405  /* flags */           I2C_DF_NOTIFY, 
    406406  /* attach_adapter */  &w83781d_attach_adapter, 
    407407  /* detach_client */   &w83781d_detach_client, 
     
    904904  } else { 
    905905    if (reg & 0xff00) 
    906       smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK, 
     906      i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK, 
    907907                            reg >> 8); 
    908     res = smbus_read_byte_data(client->adapter,client->addr, reg); 
     908    res = i2c_smbus_read_byte_data(client->adapter,client->addr, reg); 
    909909    if (word_sized) 
    910       res = (res << 8) + smbus_read_byte_data(client->adapter,client->addr,  
     910      res = (res << 8) + i2c_smbus_read_byte_data(client->adapter,client->addr,  
    911911                                              reg); 
    912912    if (reg & 0xff00) 
    913       smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0); 
     913      i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0); 
    914914  } 
    915915  up( & (((struct w83781d_data *) (client->data)) -> lock)); 
     
    957957  } else { 
    958958    if (reg & 0xff00) 
    959       smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK, 
     959      i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK, 
    960960                            reg >> 8); 
    961961    if (word_sized) { 
    962        smbus_write_byte_data(client->adapter,client->addr, reg, value >> 8); 
    963        smbus_write_byte_data(client->adapter,client->addr, reg+1, value &0xff); 
     962       i2c_smbus_write_byte_data(client->adapter,client->addr, reg, value >> 8); 
     963       i2c_smbus_write_byte_data(client->adapter,client->addr, reg+1, value &0xff); 
    964964    } else 
    965       smbus_write_byte_data(client->adapter,client->addr, reg, value &0xff); 
     965      i2c_smbus_write_byte_data(client->adapter,client->addr, reg, value &0xff); 
    966966    if (reg & 0xff00) 
    967       smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0); 
     967      i2c_smbus_write_byte_data(client->adapter,client->addr,W83781D_REG_BANK,0); 
    968968  } 
    969969  up( & (((struct w83781d_data *) (client->data)) -> lock)); 
  • lm-sensors/trunk/kernel/sensors.c

    r496 r499  
    738738    /* OK, so we really should examine this address. First check 
    739739       whether there is some client here at all! */ 
    740     if (is_isa || (smbus_read_byte(adapter,addr) >= 0)) 
     740    if (is_isa || (i2c_smbus_read_byte(adapter,addr) >= 0)) 
    741741      if ((err = found_proc(adapter,addr,-1))) 
    742742        return err;