Changeset 3737

Show
Ignore:
Timestamp:
12/03/02 23:31:34 (10 years ago)
Author:
kmalkki
Message:

(Kyösti) Fix clock cycle high time when client device has pulled and

released SCL within the timeout period in sclhi().

Document I2C_M_IGNORE_NAK and I2C_M_NO_RD_ACK flags.
Fix I2C_M_NOSTART description and example.

Location:
i2c/trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/CHANGES

    r3732 r3737  
    20202.7.0 (200211??) 
    2121  drivers (several): C99 initializers (sync w/ kernel 2.5.49); HZ fixes 
    22   i2c.h: Add I2C_M_IGNORE_NAK. 
     22  i2c.h: Add I2C_M_IGNORE_NAK, I2C_M_NO_RD_ACK to flags. 
    2323  i2c-algo-bit.c: Support I2C_M_IGNORE_NAK. Use time_after() with jiffies. 
    24            Debug message improvements.      
     24           Debug message improvements. Fix clock high time in sclhi(). 
    2525  i2c-algo-8xx.c: Several updates and cleanups 
    2626  i2c-algo-ibm_ocp.[ch], i2c-adap-ibm_ocp.c: Rename i2c_iic_[add,del]_bus to 
     
    3232  i2c-proc.h: Add SENSORS_INSMOD_8; add naming for new dummy adapters 
    3333  mkpatch: Fix export-objs 
     34  doc/i2c-protocol: Comment new client flags, fix I2C_M_NOSTART samples. 
    3435  Makefile: Take kernel source location from /lib/modules/x.x.x/build 
    3536 
  • i2c/trunk/doc/i2c-protocol

    r3490 r3737  
    5353 
    5454  Flag I2C_M_NOSTART:  
    55     In a combined transaction, no 'S Addr' is generated at some point. 
    56     For example, setting I2C_M_NOSTART on the second partial message 
     55    In a combined transaction, no 'S Addr Wr/Rd [A]' is generated at some 
     56    point. For example, setting I2C_M_NOSTART on the second partial message 
    5757    generates something like: 
    58       S Addr Rd [A] [Data] NA Wr [A] Data [A] P 
     58      S Addr Rd [A] [Data] NA Data [A] P 
    5959    If you set the I2C_M_NOSTART variable for the first partial message, 
    6060    we do not generate Addr, but we do generate the startbit S. This will 
     
    6666    flag. For example: 
    6767      S Addr Rd [A] Data [A] Data [A] ... [A] Data [A] P 
    68                        
     68 
     69  Flags I2C_M_IGNORE_NAK 
     70    Normally message is interrupted immediately if there is [NA] from the 
     71    client. Setting this flag treats any [NA] as [A], and all of 
     72    message is sent. 
     73    These messages may still fail to SCL lo->hi timeout. 
     74 
     75  Flags I2C_M_NO_RD_ACK 
     76    In a read message, master A/NA bit is skipped. 
  • i2c/trunk/kernel/i2c-algo-bit.c

    r3732 r3737  
    103103 
    104104        setscl(adap,1); 
    105         udelay(adap->udelay); 
    106105 
    107106        /* Not all adapters have scl sense line... */ 
     
    127126        } 
    128127        DEBSTAT(printk(KERN_DEBUG "needed %ld jiffies\n", jiffies-start)); 
     128        udelay(adap->udelay); 
    129129#ifdef SLO_IO 
    130130        SLO_IO 
  • i2c/trunk/kernel/i2c.h

    r3732 r3737  
    398398#define I2C_M_NOSTART   0x4000 
    399399#define I2C_M_REV_DIR_ADDR      0x2000 
    400 #define I2C_M_IGNORE_NAK        0x1000    
     400#define I2C_M_IGNORE_NAK        0x1000 
     401#define I2C_M_NO_RD_ACK         0x0800 
    401402        short len;              /* msg length                           */ 
    402403        char *buf;              /* pointer to msg data                  */ 
     
    407408#define I2C_FUNC_I2C                    0x00000001 
    408409#define I2C_FUNC_10BIT_ADDR             0x00000002 
    409 #define I2C_FUNC_PROTOCOL_MANGLING      0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART} */ 
     410#define I2C_FUNC_PROTOCOL_MANGLING      0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ 
    410411#define I2C_FUNC_SMBUS_HWPEC_CALC       0x00000008 /* SMBus 2.0 */ 
    411412#define I2C_FUNC_SMBUS_READ_WORD_DATA_PEC  0x00000800 /* SMBus 2.0 */