linux/drivers
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
..
accessibility
acpi Merge branch 'pm-acpi' 2012-07-19 00:03:35 +02:00
amba
ata
atm
auxdisplay
base Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-07-23 12:27:27 -07:00
bcma
block Power management updates for 3.6 2012-07-22 13:36:52 -07:00
bluetooth
cdrom
char Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-07-23 18:54:23 -07:00
clk arm-soc: new SoC support 2012-07-23 16:31:31 -07:00
clocksource arm-soc: new SoC support 2012-07-23 16:31:31 -07:00
connector
cpufreq cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch 2012-07-20 21:39:25 +02:00
cpuidle Merge branch 'pm-domains' 2012-07-19 00:03:17 +02:00
crypto arm-soc: clk changes 2012-07-23 17:51:03 -07:00
dca
devfreq
dio
dma
edac
eisa
extcon
firewire
firmware
gpio arm-soc: sparse IRQ conversion 2012-07-23 17:36:02 -07:00
gpu gma500,cdv: Fix the brightness base 2012-07-16 09:20:33 -07:00
hid Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-07-19 08:15:55 -07:00
hsi
hv
hwmon Merge branch 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 16:07:45 -07:00
hwspinlock hwspinlock/core: use global ID to register hwspinlocks on multiple devices 2012-07-07 22:35:30 +03:00
i2c i2c-i801: Enable IRQ for SMBus transactions 2012-07-24 14:13:58 +02:00
ide
idle ACPI: intel_idle : break dependency between modules 2012-07-05 22:37:47 +02:00
ieee802154
iio
infiniband Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-07-22 13:31:57 -07:00
input arm-soc: clk changes 2012-07-23 17:51:03 -07:00
iommu Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-07-22 12:19:36 -07:00
isdn drivers/isdn/mISDN/stack.c: remove invalid reference to list iterator variable 2012-07-09 15:24:33 -07:00
leds leds: heartbeat: fix bug on panic 2012-07-04 15:55:19 +08:00
lguest
macintosh
md Three fixes for device-mapper discard processing: 2012-07-20 11:51:22 -07:00
media arm-soc: sparse IRQ conversion 2012-07-23 17:36:02 -07:00
memory
memstick
message
mfd Linux 3.5-rc7 2012-07-15 21:49:21 +01:00
misc Merge branch 'akpm' (Andrew's patch-bomb) 2012-07-11 16:06:54 -07:00
mmc arm-soc: clk changes 2012-07-23 17:51:03 -07:00
mtd Change the default amount of eraseblocks which UBI reserves for bad block 2012-07-23 15:53:06 -07:00
net ixgbevf: Fix panic when loading driver 2012-07-17 02:56:53 -07:00
nfc
nubus
of Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-07-23 18:54:23 -07:00
oprofile
parisc
parport
pci Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-07-23 19:10:54 -07:00
pcmcia
pinctrl arm-soc: pincontrol drivers 2012-07-23 17:36:53 -07:00
platform Power management updates for 3.6 2012-07-22 13:36:52 -07:00
pnp
power
pps
ps3
ptp
rapidio
regulator Merge branch 'regulator-drivers' into regulator-next 2012-07-22 19:32:00 +01:00
remoteproc remoteproc: fix missing CONFIG_FW_LOADER configurations 2012-07-04 11:01:12 +03:00
rpmsg rpmsg: fix dependency on initialization order 2012-07-17 13:10:38 +03:00
rtc arm-soc: device tree description updates 2012-07-23 16:17:43 -07:00
s390
sbus
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2012-07-22 13:31:57 -07:00
sfi
sh Merge branch 'common/pinctrl' into sh-latest 2012-07-20 16:42:59 +09:00
sn
spi arm-soc: clk changes 2012-07-23 17:51:03 -07:00
ssb
staging arm-soc: clk changes 2012-07-23 17:51:03 -07:00
target iscsi-target: Drop bogus struct file usage for iSCSI/SCTP 2012-07-21 02:44:13 -07:00
tc
thermal
tty arm-soc: sparse IRQ conversion 2012-07-23 17:36:02 -07:00
uio
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2012-07-23 19:10:54 -07:00
uwb
vhost
video arm-soc: device tree description updates 2012-07-23 16:17:43 -07:00
virt
virtio virtio-balloon: fix add/get API use 2012-07-09 09:07:22 +09:30
vlynq
vme
w1
watchdog Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-07-23 18:54:23 -07:00
xen
zorro
Kconfig
Makefile