diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-03 17:27:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-03 17:27:07 -0500 |
commit | ebcd241a635c868b1f89abbfb4dd176ca5f81eba (patch) | |
tree | ecdfe92e5bcc5a8d0c104d9f57f6744ccca7f585 | |
parent | 5dc626358f76e32c4f111904f165bb28e2b447c0 (diff) | |
parent | ccfc866356674cb3a61829d239c685af6e85f197 (diff) |
Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c bugfixes from Wolfram Sang:
"A few driver bugfixes for 3.18"
* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: omap: fix i207 errata handling
i2c: designware: prevent early stop on TX FIFO empty
i2c: omap: fix NACK and Arbitration Lost irq handling
-rw-r--r-- | drivers/i2c/busses/i2c-designware-core.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-omap.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index edca99dbba23..23628b7bfb8d 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c | |||
@@ -359,7 +359,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev) | |||
359 | } | 359 | } |
360 | 360 | ||
361 | /* Configure Tx/Rx FIFO threshold levels */ | 361 | /* Configure Tx/Rx FIFO threshold levels */ |
362 | dw_writel(dev, dev->tx_fifo_depth - 1, DW_IC_TX_TL); | 362 | dw_writel(dev, dev->tx_fifo_depth / 2, DW_IC_TX_TL); |
363 | dw_writel(dev, 0, DW_IC_RX_TL); | 363 | dw_writel(dev, 0, DW_IC_RX_TL); |
364 | 364 | ||
365 | /* configure the i2c master */ | 365 | /* configure the i2c master */ |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 26942c159de1..277a2288d4a8 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -922,14 +922,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) | |||
922 | if (stat & OMAP_I2C_STAT_NACK) { | 922 | if (stat & OMAP_I2C_STAT_NACK) { |
923 | err |= OMAP_I2C_STAT_NACK; | 923 | err |= OMAP_I2C_STAT_NACK; |
924 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK); | 924 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK); |
925 | break; | ||
926 | } | 925 | } |
927 | 926 | ||
928 | if (stat & OMAP_I2C_STAT_AL) { | 927 | if (stat & OMAP_I2C_STAT_AL) { |
929 | dev_err(dev->dev, "Arbitration lost\n"); | 928 | dev_err(dev->dev, "Arbitration lost\n"); |
930 | err |= OMAP_I2C_STAT_AL; | 929 | err |= OMAP_I2C_STAT_AL; |
931 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL); | 930 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL); |
932 | break; | ||
933 | } | 931 | } |
934 | 932 | ||
935 | /* | 933 | /* |
@@ -954,11 +952,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) | |||
954 | if (dev->fifo_size) | 952 | if (dev->fifo_size) |
955 | num_bytes = dev->buf_len; | 953 | num_bytes = dev->buf_len; |
956 | 954 | ||
957 | omap_i2c_receive_data(dev, num_bytes, true); | 955 | if (dev->errata & I2C_OMAP_ERRATA_I207) { |
958 | |||
959 | if (dev->errata & I2C_OMAP_ERRATA_I207) | ||
960 | i2c_omap_errata_i207(dev, stat); | 956 | i2c_omap_errata_i207(dev, stat); |
957 | num_bytes = (omap_i2c_read_reg(dev, | ||
958 | OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F; | ||
959 | } | ||
961 | 960 | ||
961 | omap_i2c_receive_data(dev, num_bytes, true); | ||
962 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR); | 962 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR); |
963 | continue; | 963 | continue; |
964 | } | 964 | } |