Changeset 3643

Show
Ignore:
Timestamp:
06/15/02 19:11:28 (11 years ago)
Author:
mds
Message:

add I2C_PEC ioctl

Location:
i2c/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/doc/dev-interface

    r3516 r3643  
    8888ioctl(file,I2C_TENBIT,long select) 
    8989  Selects ten bit addresses if select not equals 0, selects normal 7 bit 
    90   addresses if select equals 0. 
     90  addresses if select equals 0. Default 0. 
     91 
     92ioctl(file,I2C_PEC,long select) 
     93  Selects SMBus PEC (packet error checking) generation and verification 
     94  if select not equals 0, disables if select equals 0. Default 0. 
     95  Used only for SMBus transactions. 
    9196 
    9297ioctl(file,I2C_FUNCS,unsigned long *funcs) 
  • i2c/trunk/kernel/i2c-dev.c

    r3599 r3643  
    236236                else 
    237237                        client->flags &= ~I2C_M_TEN; 
     238                return 0; 
     239        case I2C_PEC: 
     240                if (arg) 
     241                        client->flags |= I2C_CLIENT_PEC; 
     242                else 
     243                        client->flags &= ~I2C_CLIENT_PEC; 
    238244                return 0; 
    239245        case I2C_FUNCS: 
  • i2c/trunk/kernel/i2c.h

    r3640 r3643  
    497497#define I2C_FUNCS       0x0705  /* Get the adapter functionality */ 
    498498#define I2C_RDWR        0x0707  /* Combined R/W transfer (one stop only)*/ 
     499#define I2C_PEC         0x0708  /* != 0 for SMBus PEC                   */ 
    499500#if 0 
    500501#define I2C_ACK_TEST    0x0710  /* See if a slave is at a specific address */