mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* i2c block read on an SMBus
@ 2007-12-21  5:36 Venkat Subbiah
  0 siblings, 0 replies; only message in thread
From: Venkat Subbiah @ 2007-12-21  5:36 UTC (permalink / raw)
  To: linux-kernel

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-21  5:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-21  5:36 i2c block read on an SMBus Venkat Subbiah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®