|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
[PATCH v2] i2c-designware updatesHi Baruch and Ben,
here's v2 patchset of DesignWare I2C driver (i2c-designware.c). I did all test I can do for now (including arbitration tests), and fixed more issues left in the v1 patchset. I think now the driver is in reasonable shape for the mainline, and hope gets merged. The patches which already have Baruch's Acked-by: line are logically same as the previous v1 patches. For the rest are revised version of v1 patches, or newly added in v2. There are 22 patches in total and might be slightly annoying. I'll send subsequent patches only to linux-i2c. Changes in v2 ============== * i2c-designware: Set a clock name to DW I2C clock source -> dropped. * 02/22: Don't use the IC_CLR_INTR register to clear interrupts We need to preserve IC_TX_ABRT_SOURCE value before clearing interrupts, or we can't get correct abort_source. ->Fixed * 08/22: i2c_dw_xfer_msg: Fix i2c_msg search bug The intr_mask handling is folded into the for-loop. * 15/22: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits Commit log is updated. * 01--15 (except for 02, 08, and 15) are logically same as the previous v1 patches. * For the rest (16--22) are newly added. Shinya Kuribayashi (22): i2c-designware: Consolidate to use 32-bit word accesses i2c-designware: Don't use the IC_CLR_INTR register to clear interrupts i2c-designware: Use platform_get_irq helper i2c-designware: i2c_dw_read: Use "struct dw_i2c_dev" pointer i2c-designware: i2c_dw_xfer_msg: Use "struct dw_i2c_dev" pointer i2c-designware: Remove an useless local variable "num" i2c-designware: Improved _HCNT/_LCNT calculation i2c-designware: i2c_dw_xfer_msg: Fix i2c_msg search bug i2c-designware: Process i2c_msg messages in the interrupt handler i2c-designware: Set Tx/Rx FIFO threshold levels i2c-designware: Enable RX_FULL interrupt i2c-designware: Divide i2c_dw_xfer_msg into two functions i2c-designware: i2c_dw_xfer_msg: Introduce a local "buf" pointer i2c-designware: Initialize byte count variables just prior to being used i2c-designware: i2c_dw_func: Set I2C_FUNC_SMBUS_foo bits i2c-designware: i2c_dw_read: Remove redundant target address checker i2c-designware: Process all i2c_msg messages in the interrupt handler i2c-designware: Disable TX_EMPTY when all i2c_msg msgs has been processed i2c-designware: i2c_dw_xfer_msg: Fix error handling procedures i2c-designware: Skip RX_FULL and TX_EMPTY bits on tx abort errors i2c-designware: Tx abort cleanups i2c-designware: Cosmetic cleanups drivers/i2c/busses/i2c-designware.c | 483 +++++++++++++++++++++++++---------- 1 files changed, 350 insertions(+), 133 deletions(-) -- Shinya Kuribayashi NEC Electronics |
|
|
Re: [PATCH v2] i2c-designware updatesOn Fri, Nov 06, 2009 at 09:42:30PM +0900, Shinya Kuribayashi wrote:
> Hi Baruch and Ben, > > here's v2 patchset of DesignWare I2C driver (i2c-designware.c). > I did all test I can do for now (including arbitration tests), and > fixed more issues left in the v1 patchset. I think now the driver is > in reasonable shape for the mainline, and hope gets merged. > > The patches which already have Baruch's Acked-by: line are logically > same as the previous v1 patches. For the rest are revised version of > v1 patches, or newly added in v2. thanks, the first pass seems ok, will give a thorough review by next week and get a branch with them on for -next submission. -- Ben Q: What's a light-year? A: One-third less calories than a regular year. |
|
|
[PATCH 23/22] i2c-designware: i2c_dw_handle_tx_abort: Use dev_dbg() for NOACK casesIn the case of no-ACKs, we don't want to see dev_err() messages in the
console, because some utilities like i2c-tools are capable of printing decorated console output. This patch will ease such situations. Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi@...> --- Hi Ben, This patch can be applied on the top of the v2 patchset (as 23/22). I've tested the patch with both no-ACK cases and arbitration case. As for errors other than NOACKs, it's worth doing dev_err(). drivers/i2c/busses/i2c-designware.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-designware.c b/drivers/i2c/busses/i2c-designware.c index 4534d45..9e18ef9 100644 --- a/drivers/i2c/busses/i2c-designware.c +++ b/drivers/i2c/busses/i2c-designware.c @@ -496,13 +496,18 @@ static int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev) unsigned long abort_source = dev->abort_source; int i; + if (abort_source & DW_IC_TX_ABRT_NOACK) { + for_each_bit(i, &abort_source, ARRAY_SIZE(abort_sources)) + dev_dbg(dev->dev, + "%s: %s\n", __func__, abort_sources[i]); + return -EREMOTEIO; + } + for_each_bit(i, &abort_source, ARRAY_SIZE(abort_sources)) dev_err(dev->dev, "%s: %s\n", __func__, abort_sources[i]); if (abort_source & DW_IC_TX_ARB_LOST) return -EAGAIN; - else if (abort_source & DW_IC_TX_ABRT_NOACK) - return -EREMOTEIO; else if (abort_source & DW_IC_TX_ABRT_GCALL_READ) return -EINVAL; /* wrong msgs[] data */ else -- 1.6.5.2 |
|
|
Re: [PATCH v2] i2c-designware updatesOn Fri, Nov 06, 2009 at 09:42:30PM +0900, Shinya Kuribayashi wrote:
> Hi Baruch and Ben, > > here's v2 patchset of DesignWare I2C driver (i2c-designware.c). > I did all test I can do for now (including arbitration tests), and > fixed more issues left in the v1 patchset. I think now the driver is > in reasonable shape for the mainline, and hope gets merged. > > The patches which already have Baruch's Acked-by: line are logically > same as the previous v1 patches. For the rest are revised version of > v1 patches, or newly added in v2. > > There are 22 patches in total and might be slightly annoying. I'll > send subsequent patches only to linux-i2c. These are all queued at: git://git.fluff.org/bjdooks/linux.git next-i2c-designware -- Ben (ben@..., http://www.fluff.org/) 'a smiley only costs 4 bytes' |
| Free embeddable forum powered by Nabble | Forum Help |