- May 14, 2014
-
-
Du, Wenkai authored
There have been "i2c_designware 80860F41:00: controller timed out" errors on a number of Baytrail platforms. The issue is caused by incorrect value in Interrupt Mask Register (DW_IC_INTR_MASK) when i2c core is being enabled. This causes call to __i2c_dw_enable() to immediately start the transfer which leads to timeout. There are 3 failure modes observed: 1. Failure in S0 to S3 resume path The default value after reset for DW_IC_INTR_MASK is 0x8ff. When we start the first transaction after resuming from system sleep, TX_EMPTY interrupt is already unmasked because of the hardware default. 2. Failure in normal operational path This failure happens rarely and is hard to reproduce. Debug trace showed that DW_IC_INTR_MASK had value of 0x254 when failure occurred, which meant TX_EMPTY was unmasked. 3. Failure in S3 to S0 suspend path This failure also happens rarely and is hard to reproduce. Adding debug trace that read DW_IC_INTR_MASK made this failure not reproducible. But from ISR call trace we could conclude TX_EMPTY was unmasked when problem occurred. The patch masks all interrupts before the controller is enabled to resolve the faulty DW_IC_INTR_MASK conditions. Signed-off-by:
Wenkai Du <wenkai.du@intel.com> Acked-by:
Mika Westerberg <mika.westerberg@linux.intel.com> [wsa: improved the comment and removed typo in commit msg] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- Mar 09, 2014
-
-
Romain Baeriswyl authored
This patch allows to set independantly SCL and SDA falling times. The tLOW period is computed by taking into account the SCL falling time. The tHIGH period is computed by taking into account the SDA falling time. For instance in case the margin on tLOW is considered too small, it can be increased by increasing the SCL falling time which is by default set at 300ns. The same applies for tHIGH period with the help of SDA falling time. Signed-off-by:
Romain Baeriswyl <romainba@abilis.com> Reviewed-by:
Christian Ruppert <christian.ruppert@abilis.com> Acked-by:
Shinya Kuribayashi <skuribay@pobox.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 13, 2014
-
-
Baruch Siach authored
Since 93abe8e4 (clk: add non CONFIG_HAVE_CLK routines) code using clk.h like this platform driver need not depend on HAVE_CLK. Also, remove a redundant clk.h include from core driver. Signed-off-by:
Baruch Siach <baruch@tkos.co.il> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Nov 15, 2013
-
-
Wolfram Sang authored
Use this new function to make code more comprehensible, since we are reinitialzing the completion, not initializing. [akpm@linux-foundation.org: linux-next resyncs] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> (personally at LCE13) Cc: Ingo Molnar <mingo@kernel.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Sep 27, 2013
-
-
Chew, Chiau Ee authored
According to Designware I2C spec, if I2C_DYNAMIC_TAR_UPDATE is set to 1, the 10-bit addressing mode is controlled by IC_10BITADDR_MASTER bit of IC_TAR register instead of IC_CON register. The IC_10BITADDR_MASTER in IC_CON register becomes read-only copy. Since I2C_DYNAMIC_TAR_UPDATE value can't be detected from hardware register, so we will always set the IC_10BITADDR_MASTER bit in both IC_CON and IC_TAR register whenever 10-bit addresing mode is requested by user application. Signed-off-by:
Chew, Chiau Ee <chiau.ee.chew@intel.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Aug 28, 2013
-
-
Mika Westerberg authored
The DesignWare I2C controller has high count (HCNT) and low count (LCNT) registers for each of the I2C speed modes (standard and fast). These registers are programmed based on the input clock speed in the driver. The current code calculates these values based on the input clock speed and tries hard to meet the I2C bus timing requirements. This could result non-optimal values with regarding to the bus speed. For example on Intel BayTrail we get bus speed of 315.41kHz which is ~20% slower than we would expect (400kHz) in fast mode (even though the timing requirements are met). This patch makes it possible for the platform code to pass more optimal HCNT/LCNT values to the core driver if they are known beforehand. If these are not set we use the calculated and more conservative values. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Shinya Kuribayashi <skuribay@pobox.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Aug 07, 2013
-
-
Chew, Chiau Ee authored
If both IC_EMPTYFIFO_HOLD_MASTER_EN and IC_RESTART_EN are set to 1, the Designware I2C controller doesn't generate RESTART unless user specifically requests it by setting RESTART bit in IC_DATA_CMD register. Since IC_EMPTYFIFO_HOLD_MASTER_EN setting can't be detected from hardware register, we must always manually set the restart bit between messages. Signed-off-by:
Chew, Chiau Ee <chiau.ee.chew@intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jun 26, 2013
-
-
Christian Ruppert authored
This patch makes the SDA hold time configurable through device tree. Signed-off-by:
Christian Ruppert <christian.ruppert@abilis.com> Signed-off-by:
Pierrick Hascoet <pierrick.hascoet@abilis.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> for arch/arc bits Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jun 15, 2013
-
-
Christian Ruppert authored
The designware block is not always properly disabled in the case of transfer errors. Interrupts from aborted transfers might be handled after the data structures for the following transfer are initialised but before the hardware is set up. This can corrupt the data structures to the point that the system is stuck in an infinite interrupt loop (where FIFOs are never emptied because dev->msg_read_idx == dev->msgs_num). This patch cleanly disables the designware-i2c hardware at the end of every transfer, be it successful or not. Signed-off-by:
Christian Ruppert <christian.ruppert@abilis.com> [wsa: extended the comment] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jun 12, 2013
-
-
Mika Westerberg authored
If a process receives signal while it is waiting for I2C transfer to complete, an error is returned to the caller and the transfer is aborted. This can cause the driver to fail subsequent transfers. Also according to commit d295a86e (i2c: mv64xxx: work around signals causing I2C transactions to be aborted) I2C drivers aren't supposed to abort transactions on signals. To prevent this switch to use wait_for_completion_timeout() instead of wait_for_completion_interruptible_timeout() in the designware I2C driver. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by:
Christian Ruppert <christian.ruppert@abilis.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- May 17, 2013
-
-
Mika Westerberg authored
If the I2C bus is put to a low power state by an ACPI method it might pull the SDA line low (as its power is removed). Once the bus is put to full power state again, the SDA line is pulled back to high. This transition looks like a STOP condition from the controller point-of-view which sets STOP detected bit in its status register causing the driver to fail subsequent transfers. Fix this by always clearing all interrupts before we start a transfer. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
Josef Ahmad authored
i2c_dw_xfer_msg() pushes a number of bytes to transmit/receive to/from the bus into the TX FIFO. For master-rx transactions, the maximum amount of data that can be received is calculated depending solely on TX and RX FIFO load. This is racy - TX FIFO may contain master-rx data yet to be processed, which will eventually land into the RX FIFO. This data is not taken into account and the function may request more data than the controller is actually capable of storing. This patch ensures the driver takes into account the outstanding master-rx data in TX FIFO to prevent RX FIFO overrun. Signed-off-by:
Josef Ahmad <josef.ahmad@linux.intel.com> Acked-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- Apr 15, 2013
-
-
Mika Westerberg authored
Using autosuspend helps to reduce the resume latency in situations where another I2C message is going to be started soon. For example with HID over I2C touch panels we get several messages in a short period of time while the touch panel is in use. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Mika Westerberg authored
This is not an atomic context so there is no need to use mdelay() but instead use usleep_range(). Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Mika Westerberg authored
The correct way to disable or enable the controller is to wait until the DW_IC_ENABLE_STATUS register bit matches the bit we program into DW_IC_ENABLE register. This procedure is described in the DesignWare I2C databook. By doing this we can be sure that the controller is in correct state once the function returns. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 28, 2013
-
-
Mika Westerberg authored
If IC_EMPTYFIFO_HOLD_MASTER_EN is set to one, the DesignWare I2C controller doesn't generate STOP on the bus when the FIFO is empty. This violates the rules of Linux I2C stack as it requires that the STOP is issued once the i2c_transfer() is finished. However, there is no way to detect this from the hardware registers, so we must make sure that the STOP bit is always set once the last byte of the last message is transferred. This patch is based on the work of Dirk Brandewie. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- Jan 22, 2013
-
-
Mika Westerberg authored
The driver can also be built as a module so add MODULE_LICENSE for it. In addition add MODULE_DESCRIPTION as well. Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- Oct 05, 2012
-
-
Jean Delvare authored
i2c_dw_xfer_msg is only called internally so it can be static. It original was, before the driver split. No idea why it was changed at that time. Signed-off-by:
Jean Delvare <khali@linux-fr.org> Acked-by:
Dirk Brandewie <dirk.brandewie@gmail.com>
-
- Sep 10, 2012
-
-
Axel Lin authored
This patch adds config I2C_DESIGNWARE_CORE in Kconfig, and let I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI select I2C_DESIGNWARE_CORE. Because both I2C_DESIGNWARE_PLATFORM and I2C_DESIGNWARE_PCI can be built as built-in or module, we also need to export the functions in i2c-designware-core. This fixes below build error when CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=y: LD drivers/i2c/busses/built-in.o drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_clear_int': i2c-designware-core.c:(.text+0xa10): multiple definition of `i2c_dw_clear_int' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x928): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_init': i2c-designware-core.c:(.text+0x178): multiple definition of `i2c_dw_init' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x90): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `dw_readl': i2c-designware-core.c:(.text+0xe8): multiple definition of `dw_readl' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x0): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_isr': i2c-designware-core.c:(.text+0x724): multiple definition of `i2c_dw_isr' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x63c): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_xfer': i2c-designware-core.c:(.text+0x4b0): multiple definition of `i2c_dw_xfer' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x3c8): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_is_enabled': i2c-designware-core.c:(.text+0x9d4): multiple definition of `i2c_dw_is_enabled' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8ec): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `dw_writel': i2c-designware-core.c:(.text+0x124): multiple definition of `dw_writel' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x3c): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_xfer_msg': i2c-designware-core.c:(.text+0x2e8): multiple definition of `i2c_dw_xfer_msg' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x200): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_enable': i2c-designware-core.c:(.text+0x9c8): multiple definition of `i2c_dw_enable' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8e0): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_read_comp_param': i2c-designware-core.c:(.text+0xa24): multiple definition of `i2c_dw_read_comp_param' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x93c): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_disable': i2c-designware-core.c:(.text+0x9dc): multiple definition of `i2c_dw_disable' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x8f4): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_func': i2c-designware-core.c:(.text+0x710): multiple definition of `i2c_dw_func' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x628): first defined here drivers/i2c/busses/i2c-designware-pci.o: In function `i2c_dw_disable_int': i2c-designware-core.c:(.text+0xa18): multiple definition of `i2c_dw_disable_int' drivers/i2c/busses/i2c-designware-platform.o:i2c-designware-platdrv.c:(.text+0x930): first defined here make[3]: *** [drivers/i2c/busses/built-in.o] Error 1 make[2]: *** [drivers/i2c/busses] Error 2 make[1]: *** [drivers/i2c] Error 2 make: *** [drivers] Error 2 Signed-off-by:
Axel Lin <axel.lin@gmail.com> Signed-off-by:
Jean Delvare <khali@linux-fr.org> Tested-by:
Jiri Slaby <jslaby@suse.cz> Cc: stable@vger.kernel.org [3.2+]
-
- May 12, 2012
-
-
Stefan Roese authored
The STM SPEAr platform can only access the i2c controller register via 16bit read/write functions. This patch adds support to automatically detect this 16bit access mode. Signed-off-by:
Stefan Roese <sr@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- Oct 29, 2011
-
-
Dirk Brandewie authored
Add runtime power management to the PCI driver. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
Move all register manipulation code into the core, also move register offset definitions to i2c-designware-core.c since the bus specific portions of the driver no longer need/use them. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
Add check to make sure that the core is enabled and has outstanding interrupts. The activity bit is masked due to the fact that it will stay active even after the controller has been disabled until the contoller internal state machines have settled. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
With multiple I2C adapters possible in the system each running at (possibly) different speeds we need to move the controller configuration bit field to the adapter. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
The functionality of the adapter depends on the configuration of the IP block at silicon compile time and is adapter specific. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
The clock frequecy supplied to the IP core is specific to a single instance of the driver. This patch makes it possible to have multiple Designware I2C cores in the system possibly running at different core frequencies. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
This patch splits i2c-designware.c into three pieces: i2c-designware-core.c, contains the code that interacts directly with the core. i2c-designware-platdrv.c, contains the code specific to the platform driver using the core. i2c-designware-core.h contains the definitions and declareations shared by i2c-designware-core.c and i2c-designware-platdrv.c. This patch is the first in a set to allow multiple instances of the designware I2C core in the system. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Dirk Brandewie authored
Move checking IP core version to i2c_dw_init() in preparation for splitting i2c-designware.c into core and bus specific portions. Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Jean-Hugues Deschenes authored
Allows CPUs of a given endianness to access a dw controller of a different endianness. Endianncess difference is detected at run time through the dw component type register. Signed-off-by:
Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Jean-Hugues Deschenes authored
Designware component type register is checked before attaching to the device. Signed-off-by:
Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Jean-Hugues Deschenes authored
Use local versions of readl & writel, so per-access manipulations may be performed Signed-off-by:
Jean-Hugues Deschenes <jean-hugues.deschenes@octasic.com> Signed-off-by:
Dirk Brandewie <dirk.brandewie@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Yong Zhang authored
Since commit [c58543c8: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by:
Yong Zhang <yong.zhang0@gmail.com> Acked-by:
Wolfram Sang <w.sang@pengutronix.de> Acked-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Barry Song <21cnbao@gmail.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
- Sep 15, 2011
-
-
Justin P. Mattock authored
This is a resend from the original, changing the title from PATCH to RFC(since this is a review for commit, and I should have put that the first go around). and also removing some of the commit's with ia64 and bash since it is significant. let me know if I might have missed anything etc.. Signed-off-by:
Justin P. Mattock <justinmattock@gmail.com> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Mar 31, 2011
-
-
Lucas De Marchi authored
Fixes generated by 'codespell' and manually reviewed. Signed-off-by:
Lucas De Marchi <lucas.demarchi@profusion.mobi>
-
- Mar 30, 2010
-
-
Tejun Heo authored
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by:
Tejun Heo <tj@kernel.org> Guess-its-ok-by:
Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
-
- Mar 06, 2010
-
-
Akinobu Mita authored
Rename for_each_bit to for_each_set_bit in the kernel source tree. To permit for_each_clear_bit(), should that ever be added. The patch includes a macro to map the old for_each_bit() onto the new for_each_set_bit(). This is a (very) temporary thing to ease the migration. [akpm@linux-foundation.org: add temporary for_each_bit()] Suggested-by:
Alexey Dobriyan <adobriyan@gmail.com> Suggested-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Artem Bityutskiy <dedekind@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Dec 09, 2009
-
-
Shinya Kuribayashi authored
In 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@necel.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Shinya Kuribayashi authored
Signed-off-by:
Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Shinya Kuribayashi authored
* ABRT_MASTER_DIS: Fix a typo. * i2c_dw_handle_tx_abort: Return an appropriate error number depending on abort_source. * i2c_dw_xfer: Add a missing abort_source initialization. Signed-off-by:
Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-
Shinya Kuribayashi authored
Suppose TX_ABRT occurs in the middle of processing i2c_msg msgs[], and a STOP condition has already been generated on the bus. In this case, subsequent i2c_dw_xfer_msg() might initiate a new and unnecessary I2C transaction, which we'd have to avoid. Furthermore, anytime TX_ABRT is set, the contents of tx/rx buffers are flushed, so we don't have to process RX_FULL and TX_EMPTY. Disable interrupts, and skip them. Signed-off-by:
Shinya Kuribayashi <shinya.kuribayashi@necel.com> Signed-off-by:
Ben Dooks <ben-linux@fluff.org>
-