lkml.org 
[lkml]   [2007]   [Dec]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 20 Dec 2007 21:36:09 -0800 (PST)
FromVenkat Subbiah <>
Subjecti2c block read on an SMBus
I am trying to do an i2c block read using a call like 

    rc = i2c_smbus_xfer(g_i2c_adp, buf[0], 0x0,
                  I2C_SMBUS_READ, 0x0,
                  I2C_SMBUS_I2C_BLOCK_DATA, &data);

and the logs show me that this hits the else part of this if condition in i801_block_transaction function in file  i2c-i801.c. (of kernel version 2.6.23.11)

    if (command == I2C_SMBUS_I2C_BLOCK_DATA) {
        if (read_write == I2C_SMBUS_WRITE) {
            /* set I2C_EN bit in configuration register */
            pci_read_config_byte(I801_dev, SMBHSTCFG, &hostc);
            pci_write_config_byte(I801_dev, SMBHSTCFG,
                          hostc | SMBHSTCFG_I2C_EN);
        } else {
            dev_err(&I801_dev->dev,
                "I2C_SMBUS_I2C_BLOCK_READ not DB!\n");
            return -1;
        }
    }
some time ago when I was doing a web search i seem to have run into a patch which allows doing a i2c block read on SMBus. Is there a patch for this? 
( Output from my lspci: 00:1f.3 SMBus: Intel Corporation 6300ESB SMBus Controller (rev 02))


Looking at the documentation for 6300ESB SMBus Controller it seems that
the only I2C read transaction supported is a block read. All the other
read transaction are SMBus type. 

Why is the i2c read block not supported in the driver? 

Thanks in advance for all the input.  Please CC me on th replies as I am not subscribed to the list.


Thx,
Venkat




\
 
 \ /
  Last update: 2007-12-21 06:47    [from the cache]
©2003-2008