linux/drivers/i2c/busses
Shinya Kuribayashi 201d6a70b7 i2c-designware: Process all i2c_msg messages in the interrupt handler
Currently we process the first i2c_dw_xfer_msg() in i2c_dw_xfer(),
but in this case there is a possibility to be interrupted by certain
interrupts.  As described before in this patchset, we need to keep
providing new transmit data within a given time period, otherwise Tx
FIFO underrun takes place and STOP condition will be generated on the
bus, even if we have more bytes to be written.

In order to exclude all such possibilities, change TX_EMPTY interrupt
usage as below:

* DW_IC_INTR_DEFAULT_MASK: Define a default interrupt mask set, and
  put TX_EMPTY there.

* i2c_dw_xfer_init: Enable DW_IC_INTR_DEFAULT_MASK prior to initiating
  a new I2C transaction.  The first TX_EMPTY will be triggered shortly.
  With the help of it, we can make the first call to i2c_dw_xfer_msg()
  in the interrupt handler.

* i2c_dw_xfer_msg: Fixup intr_mask operation accordingly.  Make sure
  that TX_EMPTY operations need to be reversed.

* request_irq: Set IRQF_DISABLED so that we could load transmit data
  into Tx FIFO without being distracted by other interrupts.

* Remove i2c_dw_xfer_msg() in i2c_dw_xfer().

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-09 00:19:12 +00:00
..
i2c-acorn.c [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h 2009-03-25 10:21:35 +00:00
i2c-ali15x3.c i2c: Add missing __devinit markers to old i2c adapter drivers 2009-12-06 17:06:23 +01:00
i2c-ali1535.c i2c: Add missing __devinit markers to old i2c adapter drivers 2009-12-06 17:06:23 +01:00
i2c-ali1563.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-amd756-s4882.c i2c: Use snprintf to set adapter names 2009-01-07 14:29:18 +01:00
i2c-amd756.c i2c: Hide probe errors caused by ACPI resource conflicts 2009-10-04 22:53:45 +02:00
i2c-amd8111.c i2c: Hide probe errors caused by ACPI resource conflicts 2009-10-04 22:53:45 +02:00
i2c-at91.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-au1550.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-bfin-twi.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-cpm.c i2c: Fix stuck transaction on cpm-i2c driver 2009-06-22 01:43:32 +01:00
i2c-davinci.c i2c: Use resource_size 2009-07-15 00:03:56 +01:00
i2c-designware.c i2c-designware: Process all i2c_msg messages in the interrupt handler 2009-12-09 00:19:12 +00:00
i2c-elektor.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-gpio.c i2c: i2c_gpio: keep probe resident for hotplugged devices. 2008-07-28 12:40:44 +01:00
i2c-highlander.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-hydra.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-i801.c i2c-i801: Retry on lost arbitration 2009-12-06 17:06:27 +01:00
i2c-ibm_iic.c Remove multiple KERN_ prefixes from printk formats 2009-07-08 10:30:03 -07:00
i2c-ibm_iic.h i2c-ibm_iic: Whitespace cleanup 2008-01-27 18:14:45 +01:00
i2c-imx.c i2c: imx: disable clock when it's possible to save power. 2009-11-02 23:28:47 +00:00
i2c-iop3xx.c i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR 2009-12-06 17:06:22 +01:00
i2c-iop3xx.h
i2c-isch.c i2c: Hide probe errors caused by ACPI resource conflicts 2009-10-04 22:53:45 +02:00
i2c-ixp2000.c i2c: Make sure i2c_algo_bit_data.timeout is HZ-independent 2009-02-24 19:19:49 +01:00
i2c-mpc.c i2c-mpc: Do not generate STOP after read. 2009-11-02 23:28:47 +00:00
i2c-mv64xxx.c i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR 2009-12-06 17:06:22 +01:00
i2c-nforce2-s4985.c i2c: Fix oops on bus multiplexer driver loading 2008-08-10 22:56:15 +02:00
i2c-nforce2.c i2c: Timeouts off by 1 2009-05-05 08:39:24 +02:00
i2c-ocores.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-omap.c i2c-omap: Enable workaround for Errata 1.153 based on 2009-08-20 22:27:58 +01:00
i2c-parport-light.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-parport.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-parport.h
i2c-pasemi.c i2c: Let bus drivers add SPD to their class 2008-07-14 22:38:29 +02:00
i2c-pca-isa.c i2c-algo-pca: Use timeout for checking the state machine 2009-03-28 21:34:45 +01:00
i2c-pca-platform.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-piix4.c i2c-piix4: Modify code name SB900 to Hudson-2 2009-11-07 13:10:46 +01:00
i2c-pmcmsp.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-pnx.c ARM: PNX4008: i2c-pnx: use the same dev_id for request_irq and free_irq 2009-11-21 19:01:05 +00:00
i2c-powermac.c i2c: Bus drivers don't have to support I2C_M_REV_DIR_ADDR 2009-12-06 17:06:22 +01:00
i2c-pxa.c I2C: Rework i2c-pxa suspend_late()/resume_early() 2009-07-22 00:28:39 +02:00
i2c-s3c2410.c Merge branch 'master' into for-linus 2009-07-30 19:38:04 +02:00
i2c-s6000.c i2c: xtensa s6000 i2c driver 2009-04-07 10:23:34 +01:00
i2c-s6000.h i2c: xtensa s6000 i2c driver 2009-04-07 10:23:34 +01:00
i2c-scmi.c ACPI: i2c-scmi: don't use acpi_device_uid() 2009-09-26 01:42:07 -04:00
i2c-sh7760.c sh: clkfwk: module_clk -> peripheral_clk rename. 2009-05-13 16:59:40 +09:00
i2c-sh_mobile.c i2c: Runtime PM for SuperH Mobile I2C 2009-08-23 18:03:19 +09:00
i2c-sibyte.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-simtec.c i2c: Use resource_size 2009-07-15 00:03:56 +01:00
i2c-sis96x.c i2c: Hide probe errors caused by ACPI resource conflicts 2009-10-04 22:53:45 +02:00
i2c-sis630.c i2c: Add missing __devinit markers to old i2c adapter drivers 2009-12-06 17:06:23 +01:00
i2c-sis5595.c i2c: Add missing __devinit markers to old i2c adapter drivers 2009-12-06 17:06:23 +01:00
i2c-stu300.c i2c-stu300: I2C STU300 stability updates 2009-08-20 22:27:58 +01:00
i2c-stub.c i2c-stub: Allow user to disable some commands 2009-12-06 17:06:29 +01:00
i2c-taos-evm.c i2c-taos-evm: Switch echo off to improve performance 2009-09-18 22:45:43 +02:00
i2c-tiny-usb.c i2c-tiny-usb: New VID/PID pair 2008-04-11 12:07:05 +02:00
i2c-versatile.c i2c: Use resource_size macro 2009-06-16 22:42:16 +01:00
i2c-via.c i2c: Delete many unused adapter IDs 2009-01-26 21:19:52 +01:00
i2c-viapro.c i2c: Hide probe errors caused by ACPI resource conflicts 2009-10-04 22:53:45 +02:00
Kconfig i2c-voodoo3: Delete 2009-12-06 17:06:21 +01:00
Makefile i2c-voodoo3: Delete 2009-12-06 17:06:21 +01:00
scx200_acb.c i2c/scx200_acb: Provide more information on bus errors 2009-09-18 22:45:47 +02:00
scx200_i2c.c i2c: Make sure i2c_algo_bit_data.timeout is HZ-independent 2009-02-24 19:19:49 +01:00