• Javier Martinez Canillas's avatar
    i2c: exynos5: Avoid transaction timeouts due TRANSFER_DONE_AUTO not set · 9ad22474
    Javier Martinez Canillas authored
    After commit 7999eecb ("i2c: exynos5: fix arbitration lost handling"),
    some I2C transactions are failing because the TRANSFER_DONE_AUTO field is
    not set in the I2C_TRANS_STATUS register so the i2c->status value is left
    to -EINVAL causing the i2c->msg_complete completion to never be signaled.
    
    For example, when reading the time of an I2C rtc on an Exynos5800 machine:
    
    $ cat /sys/class/rtc/rtc0/time
    [   25.924594] exynos5-hsi2c 12e10000.i2c: rx timeout
    [   65.028365] max77686-rtc max77802-rtc: Fail to read time reg(-22)
    cat: /sys/class/rtc/rtc0/time: Invalid argument
    
    The Exynos5422 manual states clearly that most I2C_TRANS_STATUS reg bits
    (including TRANSFER_DONE_AUTO) are cleared after the register is read. So
    reading has side effects and should only be done if HSI2C_INT_I2C was set.
    
    Fixes: 7999eecb ("i2c: exynos5: fix arbitration lost handling")
    Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
    Reviewed-by: default avatarAndrzej Hajda <a.hajda@samsung.com>
    Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
    9ad22474
Name
Last commit
Last update
..
Kconfig Loading commit data...
Makefile Loading commit data...
i2c-acorn.c Loading commit data...
i2c-ali1535.c Loading commit data...
i2c-ali1563.c Loading commit data...
i2c-ali15x3.c Loading commit data...
i2c-amd756-s4882.c Loading commit data...
i2c-amd756.c Loading commit data...
i2c-amd8111.c Loading commit data...
i2c-at91.c Loading commit data...
i2c-au1550.c Loading commit data...
i2c-axxia.c Loading commit data...
i2c-bcm-iproc.c Loading commit data...
i2c-bcm-kona.c Loading commit data...
i2c-bcm2835.c Loading commit data...
i2c-bfin-twi.c Loading commit data...
i2c-brcmstb.c Loading commit data...
i2c-cadence.c Loading commit data...
i2c-cbus-gpio.c Loading commit data...
i2c-cpm.c Loading commit data...
i2c-cros-ec-tunnel.c Loading commit data...
i2c-davinci.c Loading commit data...
i2c-designware-baytrail.c Loading commit data...
i2c-designware-core.c Loading commit data...
i2c-designware-core.h Loading commit data...
i2c-designware-pcidrv.c Loading commit data...
i2c-designware-platdrv.c Loading commit data...
i2c-digicolor.c Loading commit data...
i2c-diolan-u2c.c Loading commit data...
i2c-dln2.c Loading commit data...
i2c-efm32.c Loading commit data...
i2c-eg20t.c Loading commit data...
i2c-elektor.c Loading commit data...
i2c-emev2.c Loading commit data...
i2c-exynos5.c Loading commit data...
i2c-gpio.c Loading commit data...
i2c-highlander.c Loading commit data...
i2c-hix5hd2.c Loading commit data...
i2c-hydra.c Loading commit data...
i2c-i801.c Loading commit data...
i2c-ibm_iic.c Loading commit data...
i2c-ibm_iic.h Loading commit data...
i2c-img-scb.c Loading commit data...
i2c-imx-lpi2c.c Loading commit data...
i2c-imx.c Loading commit data...
i2c-iop3xx.c Loading commit data...
i2c-iop3xx.h Loading commit data...
i2c-isch.c Loading commit data...
i2c-ismt.c Loading commit data...
i2c-jz4780.c Loading commit data...
i2c-kempld.c Loading commit data...
i2c-lpc2k.c Loading commit data...
i2c-meson.c Loading commit data...
i2c-mlxcpld.c Loading commit data...
i2c-mpc.c Loading commit data...
i2c-mt65xx.c Loading commit data...
i2c-mv64xxx.c Loading commit data...
i2c-mxs.c Loading commit data...
i2c-nforce2-s4985.c Loading commit data...
i2c-nforce2.c Loading commit data...
i2c-nomadik.c Loading commit data...
i2c-ocores.c Loading commit data...
i2c-octeon-core.c Loading commit data...
i2c-octeon-core.h Loading commit data...
i2c-octeon-platdrv.c Loading commit data...
i2c-omap.c Loading commit data...
i2c-opal.c Loading commit data...
i2c-parport-light.c Loading commit data...
i2c-parport.c Loading commit data...
i2c-parport.h Loading commit data...
i2c-pasemi.c Loading commit data...
i2c-pca-isa.c Loading commit data...
i2c-pca-platform.c Loading commit data...
i2c-piix4.c Loading commit data...
i2c-pmcmsp.c Loading commit data...
i2c-pnx.c Loading commit data...
i2c-powermac.c Loading commit data...
i2c-puv3.c Loading commit data...
i2c-pxa-pci.c Loading commit data...
i2c-pxa.c Loading commit data...
i2c-qup.c Loading commit data...
i2c-rcar.c Loading commit data...
i2c-riic.c Loading commit data...
i2c-rk3x.c Loading commit data...
i2c-robotfuzz-osif.c Loading commit data...
i2c-s3c2410.c Loading commit data...
i2c-scmi.c Loading commit data...
i2c-sh7760.c Loading commit data...
i2c-sh_mobile.c Loading commit data...
i2c-sibyte.c Loading commit data...
i2c-simtec.c Loading commit data...
i2c-sirf.c Loading commit data...
i2c-sis5595.c Loading commit data...
i2c-sis630.c Loading commit data...
i2c-sis96x.c Loading commit data...
i2c-st.c Loading commit data...
i2c-stm32f4.c Loading commit data...
i2c-stu300.c Loading commit data...
i2c-sun6i-p2wi.c Loading commit data...
i2c-taos-evm.c Loading commit data...
i2c-tegra-bpmp.c Loading commit data...
i2c-tegra.c Loading commit data...
i2c-thunderx-pcidrv.c Loading commit data...
i2c-tiny-usb.c Loading commit data...
i2c-uniphier-f.c Loading commit data...
i2c-uniphier.c Loading commit data...
i2c-versatile.c Loading commit data...
i2c-via.c Loading commit data...
i2c-viapro.c Loading commit data...
i2c-viperboard.c Loading commit data...
i2c-wmt.c Loading commit data...
i2c-xgene-slimpro.c Loading commit data...
i2c-xiic.c Loading commit data...
i2c-xlp9xx.c Loading commit data...
i2c-xlr.c Loading commit data...
scx200_acb.c Loading commit data...