linux/Documentation/i2c
Daniel Kurtz 636752bcb5 i2c-i801: Enable IRQ for SMBus transactions
Add a new 'feature' to i2c-i801 to enable using PCI interrupts.
When the feature is enabled, then an isr is installed for the device's
PCI IRQ.

An I2C/SMBus transaction is always terminated by one of the following
interrupt sources: FAILED, BUS_ERR, DEV_ERR, or on success: INTR.

When the isr fires for one of these cases, it sets the ->status variable
and wakes up the waitq.  The waitq then saves off the status code, and
clears ->status (in preparation for some future transaction).
The SMBus controller generates an INTR irq at the end of each
transaction where INTREN was set in the HST_CNT register.

No locking is needed around accesses to priv->status since all writes to
it are serialized: it is only ever set once in the isr at the end of a
transaction, and cleared while no interrupts can occur.  In addition, the
I2C adapter lock guarantees that entire I2C transactions for a single
adapter are always serialized.

For this patch, the INTREN bit is set only for SMBus block, byte and word
transactions, but not for I2C reads or writes.  The use of the DS
(BYTE_DONE) interrupt with byte-by-byte I2C transactions is implemented in
a subsequent patch.

The interrupt feature has only been enabled for COUGARPOINT hardware.
In addition, it is disabled if SMBus is using the SMI# interrupt.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2012-07-24 14:13:58 +02:00
..
busses i2c-i801: Enable IRQ for SMBus transactions 2012-07-24 14:13:58 +02:00
muxes i2c: Rename last mux driver to standard pattern 2012-05-12 14:28:18 +02:00
dev-interface i2c: Document the implementation details of the /dev interface 2008-10-14 17:30:05 +02:00
fault-codes i2c: Document standard fault codes 2008-07-14 22:38:22 +02:00
functionality i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
i2c-protocol i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
i2c-stub i2c-stub: Documentation update 2009-12-06 17:06:30 +01:00
instantiating-devices USB: ohci-nxp: Rename symbols from pnx4008 to nxp 2012-03-13 14:27:28 -07:00
old-module-parameters i2c: Drop probe, ignore and force module parameters 2009-12-06 17:06:24 +01:00
smbus-protocol i2c: Functions for byte-swapped smbus_write/read_word_data 2011-10-30 13:47:25 +01:00
summary i2c: Delete an outdated piece of documentation 2007-12-12 13:45:24 +01:00
ten-bit-addresses i2c: Fix device name for 10-bit slave address 2011-11-23 11:33:07 +01:00
upgrading-clients i2c: Minor fixes to upgrading-clients document 2011-03-20 14:50:52 +01:00
writing-clients i2c/writing-clients: Mention module_i2c_driver() 2012-07-24 14:13:57 +02:00