android_kernel_motorola_sm6225/drivers/i2c/busses
Daniel Kurtz 0da2e7768b i2c: s3c2410: do not generate STOP for QUIRK_HDMIPHY
The datasheet says that the STOP sequence should be:
 1) I2CSTAT.5 = 0	- Clear BUSY (or 'generate STOP')
 2) I2CCON.4 = 0	- Clear IRQPEND
 3) Wait until the stop condition takes effect.
 4*) I2CSTAT.4 = 0 	- Clear TXRXEN

Where, step "4*" is only for buses with the "HDMIPHY" quirk.

However, after much experimentation, it appears that:
 a) normal buses automatically clear BUSY and transition from
    Master->Slave when they complete generating a STOP condition.
    Therefore, step (3) can be done in doxfer() by polling I2CCON.4
    after starting the STOP generation here.
 b) HDMIPHY bus does neither, so there is no way to do step 3.
    There is no indication when this bus has finished generating STOP.

In fact, we have found that as soon as the IRQPEND bit is cleared in
step 2, the HDMIPHY bus generates the STOP condition, and then immediately
starts transferring another data byte, even though the bus is supposedly
stopped.  This is presumably because the bus is still in "Master" mode,
and its BUSY bit is still set.

To avoid these extra post-STOP transactions on HDMI phy devices, we just
disable Serial Output on the bus (I2CSTAT.4 = 0) directly, instead of
first generating a proper STOP condition.  This should float SDA & SCK
terminating the transfer.  Subsequent transfers start with a proper START
condition, and proceed normally.

The HDMIPHY bus is an internal bus that always has exactly two devices,
the host as Master and the HDMIPHY device as the slave. Skipping the STOP
condition has been tested on this bus and works.

Also, since we disable the bus directly from the isr, we can skip the bus
idle polling loop at the end of doxfer().

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
2012-11-16 13:08:55 +01:00
..
i2c-acorn.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
i2c-ali15x3.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-ali1535.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-ali1563.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-amd756-s4882.c
i2c-amd756.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-amd8111.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-at91.c i2c: at91: fix SMBus quick command 2012-11-14 10:28:28 +01:00
i2c-au1550.c i2c/busses: Use module_platform_driver() 2012-01-12 20:32:04 +01:00
i2c-bfin-twi.c i2c: i2c-bfin-twi: Move blackfin TWI register access Macro to head file. 2012-07-13 08:37:31 +02:00
i2c-cpm.c i2c/busses: Use module_platform_driver() 2012-01-12 20:32:04 +01:00
i2c-davinci.c Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux 2012-10-11 10:27:51 +09:00
i2c-designware-core.c i2c-designware: i2c_dw_xfer_msg can be static 2012-10-05 22:23:53 +02:00
i2c-designware-core.h i2c: designware: Add support for 16bit register access 2012-05-12 14:28:11 +02:00
i2c-designware-pcidrv.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-designware-platdrv.c i2c: designware: Add clk_{un}prepare() support 2012-05-12 14:28:15 +02:00
i2c-diolan-u2c.c i2c: diolan-u2c: Fix master_xfer return code 2012-08-18 12:27:27 +02:00
i2c-eg20t.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-elektor.c Fix common misspellings 2011-03-31 11:26:23 -03:00
i2c-gpio.c i2c: i2c-gpio: fix name issue with multiple i2c gpio nodes 2012-11-14 09:56:43 +01:00
i2c-highlander.c Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1 2012-01-14 12:32:16 -08:00
i2c-hydra.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-i801.c i2c-i801: Fix comment 2012-10-28 21:37:01 +01:00
i2c-ibm_iic.c Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1 2012-01-14 12:32:16 -08:00
i2c-ibm_iic.h
i2c-imx.c Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux 2012-10-11 10:27:51 +09:00
i2c-intel-mid.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-iop3xx.c i2c: iop3xx: use standard gpiolib functions 2012-07-25 09:26:41 -05:00
i2c-iop3xx.h i2c-iop3xx: add iomem annotation 2011-01-04 00:53:37 +00:00
i2c-isch.c i2c-isch: Decrease delay in command completion check loop 2012-03-26 21:47:18 +02:00
i2c-mpc.c Merge branch 'i2c-embedded/for-next' of git://git.pengutronix.de/git/wsa/linux 2012-10-11 10:27:51 +09:00
i2c-mv64xxx.c I2C: MV64XYZ: Add Device Tree support 2012-07-23 22:04:11 +02:00
i2c-mxs.c i2c: mxs: remove broken PIOQUEUE support 2012-11-02 10:52:32 +01:00
i2c-nforce2-s4985.c
i2c-nforce2.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-nomadik.c i2c: nomadik: Fix the usage of wait_for_completion_timeout 2012-11-12 18:21:55 +01:00
i2c-nuc900.c ARM: w90x900: move platform_data definitions 2012-09-14 11:18:59 +02:00
i2c-ocores.c i2c: ocores: Use devm_request_and_ioremap() 2012-11-13 12:16:24 +01:00
i2c-octeon.c i2c: Convert i2c-octeon.c to use device tree. 2012-07-23 13:54:53 +01:00
i2c-omap.c i2c: omap: don't save a value only needed for read-clearing 2012-11-14 19:52:12 +01:00
i2c-parport-light.c i2c-parport: Various cleanups 2011-05-24 20:58:49 +02:00
i2c-parport.c i2c-parport: i2c_parport_irq can be static 2012-10-05 22:23:53 +02:00
i2c-parport.h i2c-parport: Various cleanups 2011-05-24 20:58:49 +02:00
i2c-pasemi.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-pca-isa.c
i2c-pca-platform.c i2c: Dynamically assign adapter id if it wasn't explictly specified 2012-05-12 14:28:11 +02:00
i2c-piix4.c i2c-piix4: Fix build failure 2012-10-05 22:23:55 +02:00
i2c-pmcmsp.c i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op 2012-07-19 10:38:47 -04:00
i2c-pnx.c i2c: pnx: Fix read transactions of >= 2 bytes 2012-09-12 17:52:44 +02:00
i2c-powermac.c i2c/powermac: Improve detection of devices from device-tree 2012-07-11 18:22:46 +10:00
i2c-puv3.c i2c-puv3: Use struct dev_pm_ops for power management 2012-07-12 12:04:54 +02:00
i2c-pxa-pci.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-pxa.c i2c/i2c-pxa: remove conditional compilation of clk code 2012-07-30 17:25:12 -07:00
i2c-rcar.c i2c: rcar: fix section mismatch 2012-11-13 11:24:15 +01:00
i2c-s3c2410.c i2c: s3c2410: do not generate STOP for QUIRK_HDMIPHY 2012-11-16 13:08:55 +01:00
i2c-s6000.c i2c: Change mail address of Oskar Schirmer 2012-05-17 15:15:56 +02:00
i2c-s6000.h i2c: Change mail address of Oskar Schirmer 2012-05-17 15:15:56 +02:00
i2c-scmi.c i2c-scmi: convert to module_acpi_driver() 2012-09-21 13:39:56 -04:00
i2c-sh7760.c i2c/busses: Use module_platform_driver() 2012-01-12 20:32:04 +01:00
i2c-sh_mobile.c i2c: i2c-sh_mobile: fix spurious transfer request timed out 2012-11-16 09:09:13 +01:00
i2c-sibyte.c
i2c-simtec.c i2c/busses: Use module_platform_driver() 2012-01-12 20:32:04 +01:00
i2c-sirf.c i2c: add CSR SiRFprimaII on-chip I2C controllers driver 2012-03-07 19:05:04 +01:00
i2c-sis96x.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-sis630.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-sis5595.c i2c: Convert to DEFINE_PCI_DEVICE_TABLE 2012-01-12 20:32:04 +01:00
i2c-stu300.c i2c: stu300: use devm managed resources 2012-07-16 13:48:51 +02:00
i2c-taos-evm.c i2c-taos-evm: Fix log messages 2011-06-29 11:36:10 +02:00
i2c-tegra.c i2c: tegra: set irq name as device name 2012-11-02 10:52:52 +01:00
i2c-tiny-usb.c i2c-tiny-usb: Add support for the Robofuzz OSIF USB/I2C converter 2012-07-24 14:13:59 +02:00
i2c-versatile.c i2c: Dynamically assign adapter id if it wasn't explictly specified 2012-05-12 14:28:11 +02:00
i2c-via.c i2c/busses: Use module_pci_driver 2012-07-24 14:13:56 +02:00
i2c-viapro.c i2c-viapro: Add VIA VX900 device ID 2012-10-05 22:23:53 +02:00
i2c-xiic.c I2C: xiic: Add OF binding support 2012-05-12 14:28:18 +02:00
i2c-xlr.c i2c: Support for Netlogic XLR/XLS I2C controller. 2012-02-24 22:25:57 +01:00
Kconfig i2c-i801: Simplify dependency towards GPIOLIB 2012-10-28 21:37:01 +01:00
Makefile i2c-stub: Move to drivers/i2c 2012-10-28 21:37:00 +01:00
scx200_acb.c i2c/scx200_*: Replace printks with pr_<level>s 2012-10-05 22:23:52 +02:00
scx200_i2c.c i2c/scx200_*: Replace printks with pr_<level>s 2012-10-05 22:23:52 +02:00