- 25 10月, 2010 2 次提交
-
-
由 Jean Delvare 提交于
These drivers don't use anything which is defined in <linux/i2c-id.h>. This header file was never meant to be included directly anyway, and will be deleted soon. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NBen Dooks <ben-linux@fluff.org> Acked-by: NDave Airlie <airlied@linux.ie> Cc: Hans Verkuil <hverkuil@xs4all.nl>
-
由 Nobuhiro Iwamatsu 提交于
i2c->adap.name shouldn't be used in request_irq. Instead the driver name "i2c-pca-platform" should be used. Signed-off-by: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Cc: stable@kernel.org Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
- 18 10月, 2010 2 次提交
-
-
由 Marc Kleine-Budde 提交于
The i2c_imx_trx_complete() function is using wait_event_interruptible_timeout() to wait for the I2C controller to signal that it has completed an I2C bus operation. If the process that causes the I2C operation receives a signal, the wait will be interrupted, returning an error. It is better to let the I2C operation finished before handling the signal (i.e. returning into userspace). It is safe to use wait_event_timeout() instead, because the timeout will allow the process to exit if the I2C bus hangs. It's also better to allow the I2C operation to finish, because unacknowledged I2C operations can cause the I2C bus to hang. Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de> Reviewed-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
由 Jon Povey 提交于
This patch is an improvement to 4bba0fd8 which got to mainline a little early. Sudhakar Rajashekhara explains that at least OMAP-L138 requires MDR mode settings before DXR for correct behaviour, so load MDR first with STT cleared and later load again with STT set. Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985 Signed-off-by: NJon Povey <jon.povey@racelogic.co.uk> Acked-by: NTroy Kisky <troy.kisky@boundarydevices.com> Tested-by: NSudhakar Rajashekhara <sudhakar.raj@ti.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
- 13 10月, 2010 1 次提交
-
-
由 Julia Lawall 提交于
The function has an unsigned return type, but returns a negative constant to indicate an error condition. The result of calling the function is always stored in a variable of type (signed) int, and thus unsigned can be dropped from the return type. A sematic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @exists@ identifier f; constant C; @@ unsigned f(...) { <+... * return -C; ...+> } // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 01 10月, 2010 1 次提交
-
-
由 MyungJoo Ham 提交于
S3C2440 style I2C controller uses PCLK to calculate the SDA line delay. The driver wrongly assumed that this delay is calculated from the frequency that the controller is operating on. This patch fixes this issue. Signed-off-by: NMyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
- 30 9月, 2010 2 次提交
-
-
由 Grant Likely 提交于
Commit 959e85f7, "i2c: add OF-style registration and binding" caused a module dependency loop where of_i2c.c calls functions in i2c-core, and i2c-core calls of_i2c_register_devices() in of_i2c. This means that when i2c support is built as a module when CONFIG_OF is set, then neither i2c_core nor of_i2c are able to be loaded. This patch fixes the problem by moving the of_i2c_register_devices() calls back into the device drivers. Device drivers already specifically request the core code to parse the device tree for devices anyway by setting the of_node pointer, so it isn't a big deal to also call the registration function. The drivers just become slightly more verbose. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Yegor Yefremov 提交于
ret is still -1, if during the polling read_byte() returns at once with I2C_PCA_CON_SI set. So ret > 0 would lead *_waitforcompletion() to return 0, in spite of the proper behavior. The routine was rewritten, so that ret has always a proper value, before returning. Signed-off-by: NYegor Yefremov <yegorslists@googlemail.com> Reviewed-by: NWolfram Sang <w.sang@pengutronix.de> Cc: stable@kernel.org Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
- 28 9月, 2010 2 次提交
-
-
由 Jon Povey 提交于
When setting up to transmit, a race exists between the ISR and i2c_davinci_xfer_msg() trying to load the first byte and adjust counters. This is mostly visible for transmits > 1 byte long. The hardware starts sending immediately that MDR is loaded. IMR trickery doesn't work because if we start sending, finish the first byte and an XRDY event occurs before we load IMR to unmask it, we never get an interrupt, and we timeout. Move the MDR load after DXR,IMR loads to avoid this race without locking. Tested on DM355 connected to Techwell TW2836 and Wolfson WM8985 Signed-off-by: NJon Povey <jon.povey@racelogic.co.uk> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
由 Bernhard Walle 提交于
It doesn't make sense to set result to -ETIMEDOUT but return 0 (success) afterwards. Since there's code in octeon_i2c_start() to handle the error, it should be called. Signed-off-by: NBernhard Walle <walle@corscience.de> Acked-by: NDavid Daney <ddaney@caviumnetworks.com> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
- 22 9月, 2010 1 次提交
-
-
由 Mathias Nyman 提交于
If the i2c bus receives an interrupt with both BB (bus busy) and ARDY (register access ready) statuses set during the tranfer of the last message the bus was put to idle while still busy. This caused bus to timeout. Signed-off-by: NMathias Nyman <mathias.nyman@nokia.com> Acked-by: NTony Lindgren <tony@atomide.com> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
- 11 8月, 2010 3 次提交
-
-
由 Wan ZongShun 提交于
This patch is to add i2c driver support for nuc900. Signed-off-by: NWan ZongShun <mcuos.com@gmail.org> Reviewed-by: NMarek Vasut <marek.vasut@gmail.com> Reviewed-by: NBaruch Siach <baruch@tkos.co.il> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
由 Kevin Wells 提交于
NXP LPC series processors use the IP3204 I2C block shared with the Philips PNX4008 processor. Signed-off-by: NKevin Wells <wellsk40@gmail.com> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
由 Marc Kleine-Budde 提交于
This patch adds the missing const to "struct platform_device_id" to fix this warning: /home/frogger/pengutronix/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c: In function 'i2c_pxa_probe': /home/frogger/pengutronix/linux/linux-2.6/drivers/i2c/busses/i2c-pxa.c:1004: warning: initialization discards qualifiers from pointer target type Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de> Cc: Eric Miao <eric.y.miao@gmail.com> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: NBen Dooks <ben-linux@fluff.org>
-
- 06 8月, 2010 7 次提交
-
-
由 Grant Likely 提交于
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Reviewed-by: NDavid S. Miller <davem@davemloft.net>
-
由 Philby John 提交于
Come out of i2c time out condition by following the bus recovery procedure outlined in the i2c protocol v3 spec. The kernel must be robust enough to gracefully recover from i2c bus failure without having to reset the machine. This is done by first NACKing the slave, pulsing the SCL line 9 times and then sending the stop command. This patch has been tested on a DM6446 and DM355 Signed-off-by: NPhilby John <pjohn@in.mvista.com> Signed-off-by: NSrinivasan, Nageswari <nageswari@ti.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
-
由 Chaithrika U S 提交于
Add cpufreq support for DaVinci I2C driver. Tested on DA850/OMAP-L138 EVM. Signed-off-by: NChaithrika U S <chaithrika@ti.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
-
由 Chaithrika U S 提交于
Add suspend and resume callbacks to DaVinci I2C driver. This has been tested on DA850/OMAP-L138 EVM. Signed-off-by: NChaithrika U S <chaithrika@ti.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
-
由 Chaithrika U S 提交于
Add i2c reset control and clock divider calculation functions which will be useful for power management features. Signed-off-by: NChaithrika U S <chaithrika@ti.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
-
由 Chaithrika U S 提交于
Cleanup the DaVinci I2C driver. Remove MOD_REG_BIT macro. Also use ioremap instead of IO_ADDRESS macro. Signed-off-by: NChaithrika U S <chaithrika@ti.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
-
由 Dirk Behme 提交于
This fixes Oops at kernel startup while "scanning" for TLV320AIC23IDx addresses. Additional fix from Sudhakar Rajashekhara: I think 'first byte set' should come after the write because an I2C transaction is being carried out before configuring the I2C mode register (which has bits to configure Master, Start condition etc), which causes undefined behavior. Signed-off-by: NSudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: NAlexander Vasiliev <alexvasiljev@gmail.com> Signed-off-by: NBrad Griffis <bgriffis@ti.com> Signed-off-by: NDirk Behme <dirk.behme@gmail.com> Acked-by: NKevin Hilman <khilman@deeprootsystems.com>
-
- 05 8月, 2010 1 次提交
-
-
由 Naveen Krishna Ch 提交于
This patch adds HAVE_S3C2410_I2C to control inclusion of I2C bus driver on Samsung SoCs and makes I2C bus driver dependency SoC specific instead of machine specific. This will enalbe all machines using Samsung ARCH_S3C2410, _S3C64XX, _S5P6440, _S5PC100, and _S5PV210 to select the I2C driver by default Signed-off-by: NNaveen Krishna Ch <ch.naveen@samsung.com> Signed-off-by: NKukjin Kim <kgene.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org>
-
- 02 8月, 2010 1 次提交
-
-
由 Albrecht Dreß 提交于
This patch improves the recovery of the MPC's I2C bus from errors like bus hangs resulting in timeouts: 1. make the bus timeout configurable, as it depends on the bus clock and the attached slave chip(s); default is still 1 second; 2. detect any of the cases indicated by the CF, BB and RXAK MSR flags if a timeout occurs, and add a missing (required) MAL reset; 3. use a more reliable method to fixup the bus if a hang has been detected. The sequence is sent 9 times which seems to be necessary if a slave "misses" more than one clock cycle. For 400 kHz bus speed, the fixup is also ~70us (81us vs. 150us) faster. Tested on a custom Lite5200b derived board, with a Dallas RTC, AD sensors and NXP IO expander chips attached to the i2c. Changes vs. v1: - use improved bus fixup sequence for all chips (not only the 5200) - calculate real clock from defaults if no clock is given in the device tree - better description (I hope) of the changes. I didn't split the changes in this file into three parts as recommended by Grant, as they actually belong together (i.e. they address one single problem, just in three places of one single source file). Signed-off-by: NAlbrecht Dreß <albrecht.dress@arcor.de> [grant.likely@secretlab.ca: fixup for ->node to ->dev.of_node transition] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 10 7月, 2010 1 次提交
-
-
由 Guenter Roeck 提交于
Sibyte i2c bus driver returns non-descriptive error values. Update to return error values as defined in Documentation/i2c/fault-codes. Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
- 09 7月, 2010 1 次提交
-
-
由 Jean Delvare 提交于
Fujitsu slightly changed the DMI strings in their recent machines, (for example the D2778) and this breaks the automatic loading of the needed fschmd driver. Being more tolerant on string comparison fixes the issue. This closes bug #15634: https://bugzilla.kernel.org/show_bug.cgi?id=15634Signed-off-by: NJean Delvare <khali@linux-fr.org> Tested-by: NSergey Spiridonov <sena@hurd.homeunix.org> Cc: Hans de Goede <hdegoede@redhat.com>
-
- 06 7月, 2010 2 次提交
-
-
由 Grant Likely 提交于
This patch adds OF hooks to the i2c core so that devices can automatically be registered based on device tree data. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
This patch cleans up the i2c OF support code to make it selectable by all architectures and allow for automatic registration of i2c devices. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 03 6月, 2010 1 次提交
-
-
由 Wolfram Sang 提交于
And fix a typo while we are here Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
- 22 5月, 2010 10 次提交
-
-
由 Grant Likely 提交于
.name, .match_table and .owner are duplicated in both of_platform_driver and device_driver. This patch is a removes the extra copies from struct of_platform_driver and converts all users to the device_driver members. This patch is a pretty mechanical change. The usage model doesn't change and if any drivers have been missed, or if anything has been fixed up incorrectly, then it will fail with a compile time error, and the fixup will be trivial. This patch looks big and scary because it touches so many files, but it should be pretty safe. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NSean MacLennan <smaclennan@pikatech.com>
-
由 Chase Douglas 提交于
The ACPI subsystem strictly checks for resource conflicts. When there's a conflict, it outputs a warning message with all the details needed to properly diagnose the underlying issue. However, the i2c-nforce2 driver also prints its own message. Not only is the message redundant, it is at the KERN_ERR level, which overrides some bootsplash screens for no good reason. This change removes the two lines that print out the error messages. Signed-off-by: NChase Douglas <chase.douglas@canonical.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 H Hartley Sweeten 提交于
As warned by checkpatch.pl, <linux/io.h> should be used instead of <asm/io.h>. Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Marek Szyprowski 提交于
GPIO driven I2C bus can be used for controlling the PMIC chip. The example of such configuration is Samsung Aquila board. This patch moves initialization code to subsys_initcall() to ensure that the i2c bus is available early so the regulators can be quickly probed and available for other devices on their probe() call. Such solution has been proposed by Mark Brown to fix the problem of the regulators not beeing available on the peripheral device probe(): http://lists.infradead.org/pipermail/linux-arm-kernel/2010-March/011971.html Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
parport_algo_data is a template so it can be marked const. Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
It is easier to adjust the flags when you know their default value. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com>
-
由 Jean Delvare 提交于
Make PCI device ids constant as we just did for many other i2c bus drivers already. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Márton Németh <nm127@freemail.hu>
-
由 Ivo Manca 提交于
Fix all checkpatch warnings. No functional changes are made. Signed-off-by: NIvo Manca <pinkel@gmail.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
Only the oldest devices lack some of the features supported by this driver. List them explicitly, and default to all features enabled for all other chips, including the ones added through sysfs. This will make future driver maintenance easier. In the unlikely event of a not yet supported device not implementing all the features, one can always use the disable_features module parameter to prevent the driver from attempting to use them. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NSeth Heasley <seth.heasley@intel.com>
-
由 Jean Delvare 提交于
Let the user disable selected features normally supported by the device. This makes it possible to work around possible driver or hardware bugs if the feature in question doesn't work as intended for whatever reason. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Felix Rubinstein <felixru@gmail.com>
-
- 20 5月, 2010 2 次提交
-
-
由 Wolfram Sang 提交于
When cppcheck found this flaw [./i2c/busses/i2c-highlander.c:284]: (style) Warning - using char variable in bit operation it was noted that the 'read'-variable could be simply removed as read_write can only be 0 or 1 anyhow. So, we remove the flaw and simplify the code. Reported-by: Nd binderman <dcb314@hotmail.com> Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NPaul Mundt <lethal@linux-sh.org> Acked-by: NJean Delvare <khali@linux-fr.org> Cc: Ben Dooks <ben-linux@fluff.org>
-
由 Wolfram Sang 提交于
Drop NO_IRQ as 0 is the preferred way to describe 'no irq' (http://lkml.org/lkml/2005/11/21/221). This change is safe, as the driver is only used on powerpc, where NO_IRQ is 0 anyhow. Signed-off-by: NWolfram Sang <w.sang@pengutronix.de> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NSean MacLennan <smaclennan@pikatech.com> Cc: Ben Dooks <ben-linux@fluff.org>
-