mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Venkat Subbiah <venkat_sr@yahoo.com>
To: linux-kernel@vger.kernel.org
Subject: i2c block read on an SMBus
Date: Thu, 20 Dec 2007 21:36:09 -0800 (PST)	[thread overview]
Message-ID: <570842.52526.qm@web51107.mail.re2.yahoo.com> (raw)

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



                 reply	other threads:[~2007-12-21  5:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=570842.52526.qm@web51107.mail.re2.yahoo.com \
    --to=venkat_sr@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®