aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2013-10-30 23:31:26 +0000
committerLuka Perkov <luka@openwrt.org>2013-10-30 23:31:26 +0000
commit57e70c1cc295de722f293872f89aedb1d94009b0 (patch)
tree37b2e3aba160fb9666c7c38adefecef90b795f68 /target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch
parent4f7c503fd00e256d051f9f398fff298eabed3967 (diff)
downloadupstream-57e70c1cc295de722f293872f89aedb1d94009b0.tar.gz
upstream-57e70c1cc295de722f293872f89aedb1d94009b0.tar.bz2
upstream-57e70c1cc295de722f293872f89aedb1d94009b0.zip
imx6: update patches
Changes include PCI fixes and various upstream pending patches. Signed-off-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38624 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch')
-rw-r--r--target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch b/target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch
index e876c6ed49..6039cf5e48 100644
--- a/target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch
+++ b/target/linux/imx6/patches-3.12/0040-i2c-imx-retry-on-NAK.patch
@@ -17,22 +17,22 @@ Tested-by: Luka Perkov <luka@openwrt.org>
#define IMX_I2C_BIT_RATE 100000 /* 100kHz */
+#define IMX_I2C_MAX_RETRIES 3 /* number of retries to attempt */
- /* IMX I2C registers */
- #define IMX_I2C_IADR 0x00 /* i2c slave address */
-@@ -198,7 +199,7 @@ static int i2c_imx_acked(struct imx_i2c_
+ /* IMX I2C registers:
+ * the I2C register offset is different between SoCs,
+@@ -298,7 +299,7 @@ static int i2c_imx_acked(struct imx_i2c_
{
- if (readb(i2c_imx->base + IMX_I2C_I2SR) & I2SR_RXAK) {
+ if (imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR) & I2SR_RXAK) {
dev_dbg(&i2c_imx->adapter.dev, "<%s> No ACK\n", __func__);
- return -EIO; /* No ACK */
+ return -EAGAIN; /* try again */
}
dev_dbg(&i2c_imx->adapter.dev, "<%s> ACK received\n", __func__);
-@@ -533,6 +534,7 @@ static int __init i2c_imx_probe(struct p
+@@ -633,6 +634,7 @@ static int i2c_imx_probe(struct platform
i2c_imx->adapter.dev.parent = &pdev->dev;
i2c_imx->adapter.nr = pdev->id;
i2c_imx->adapter.dev.of_node = pdev->dev.of_node;
+ i2c_imx->adapter.retries = IMX_I2C_MAX_RETRIES;
i2c_imx->base = base;
- pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
+ /* Get I2C clock */