- 25 10月, 2010 11 次提交
-
-
由 Jean Delvare 提交于
Transactions not acked can happen every now and then, in particular during device detection, and various transaction types can be used for this purpose. So stop logging this event, except when debugging is enabled. This is what other similar drivers (e.g. i2c-i801 or i2c-piix4) do. Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Guenter Roeck 提交于
The underlying I2C adapter may or may not be present when this driver gets initialized, and may disappear later, so there is no safe time at which the probe and remove functions can be discarded. Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Guenter Roeck 提交于
This patch adds support for PCA9541, an I2C Bus Master Selector. The driver is modeled as single channel I2C Multiplexer to be able to utilize the I2C multiplexer framework. Signed-off-by: NGuenter Roeck <guenter.roeck@ericsson.com> Reviewed-by: NTom Grennan <tom.grennan@ericsson.com> Acked-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
Check the class flags before allocating the temporary i2c_client structure, to avoid allocating it when we don't need it. Also optimize the inner loop a bit. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
-
由 Jean Delvare 提交于
The "new_device" sysfs interface has been there for quite some time now, nobody complained about it so it must be good enough. Time to remove the warning and call it stable. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NMichael Lawnick <ml.lawnick@gmx.de>
-
由 Julia Lawall 提交于
The functions the functions amd_ec_wait_write and amd_ec_wait_read have an unsigned return type, but return a negative constant to indicate an error condition. 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> Fixing amd_ec_wait_write and amd_ec_wait_read leads to the need to adjust the return type of the functions amd_ec_write and amd_ec_read, which are the only functions that call amd_ec_wait_write and amd_ec_wait_read. amd_ec_write and amd_ec_read, in turn, are only called from within the function amd8111_access, which already returns a signed typed value. Each of the calls to amd_ec_write and amd_ec_read are updated using the following semantic patch: // <smpl> @@ @@ + status = amd_ec_write - amd_ec_write (...); + if (status) return status; @@ @@ + status = amd_ec_read - amd_ec_read (...); + if (status) return status; // </smpl> The patch also adds the declaration of the status variable. Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 matt mooney 提交于
Replace EXTRA_CFLAGS with ccflags-y. Signed-off-by: Nmatt mooney <mfm@muteddisk.com> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 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>
-
由 Jean Delvare 提交于
This makes the calling site's code clearer IMHO. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NMichael Lawnick <ml.lawnick@gmx.de>
-
由 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>
-
由 Jean Delvare 提交于
drivers/i2c/algos/Kconfig makes all the algorithms dependent on !I2C_HELPER_AUTO, which triggers a Kconfig warning about broken dependencies when some driver selects one of the algorithms. Ideally we would make only the prompts dependent on !I2C_HELPER_AUTO, however Kconfig doesn't currently support that. So we have to redefine the symbols separately for the I2C_HELPER_AUTO=y case. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NMichal Marek <mmarek@suse.cz>
-
- 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 4 次提交
-
-
由 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>
-
由 Rajendra Nayak 提交于
For devices which are not adapted to runtime PM a call to pm_runtime_suspended always returns true. Hence the pm_runtime_suspended checks below prevent legacy suspend from getting called. So do a pm_runtime_suspended check only for devices with a dev_pm_ops populated (which hence do not rely on the legacy suspend.) Signed-off-by: NRajendra Nayak <rnayak@ti.com> Acked-by: NRafael J. Wysocki <rjw@sisk.pl> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> 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>
-
由 Vishwanath BS 提交于
In current i2c core driver, call to pm_runtime_set_active from i2c_device_pm_resume will unconditionally enable i2c module and increment child count of the parent. Because of this, in CPU Idle path, i2c does not idle, preventing Core to enter retention. Also i2c module will not be suspended upon system suspend as pm_runtime_set_suspended is not called from i2c_device_pm_suspend. This issue is fixed by removing pm_runtime_set_active call from resume path which is not necessary. This fix has been tested on OMAP4430. Signed-off-by: NPartha Basak <p-basak2@ti.com> Signed-off-by: NVishwanath BS <vishwanath.bs@ti.com> Acked-by: NRafael J. Wysocki <rjw@sisk.pl> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Ben Dooks <ben-linux@fluff.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>
-
- 12 8月, 2010 10 次提交
-
-
由 Michael Lawnick 提交于
I2C driver for PCA954x I2C multiplexer series. Signed-off-by: NMichael Lawnick <ml.lawnick@gmx.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Michael Lawnick 提交于
Add multiplexed bus core support. I2C multiplexer and switches like pca954x get instantiated as new adapters per port. Signed-off-by: NMichael Lawnick <ml.lawnick@gmx.de> Acked-by: NRodolfo Giometti <giometti@linux.it> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
Moving userspace-instantiated clients to separate lists wasn't nearly enough to avoid deadlocks in multiplexed bus cases. We also want to have a dedicated mutex to protect each list. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Michael Lawnick <ml.lawnick@gmx.de>
-
由 Jean Delvare 提交于
Make i2c_default_probe self-sufficient, so that callers don't have to do functionality checks themselves. This ensures everything is and will stay consistent. Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Jean Delvare 提交于
Now that bus_for_each_drv() is no longer __must_check, we can drop the dummy variable that was used to store the returned value. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Justin P. Mattock <justinmattock@gmail.com>
-
由 Jean Delvare 提交于
Uninline i2c adapter locking helper functions, move them to i2c-core, and use them in i2c-core itself. The functions are still exported for external users. This makes future updates to the locking model (which will be needed for multiplexing support) possible and transparent. Signed-off-by: NJean Delvare <khali@linux-fr.org> Cc: Michael Lawnick <ml.lawnick@gmx.de>
-
由 Jean Delvare 提交于
Now that i2c-core offers the possibility to provide custom probing function for I2C devices, let's make use of it. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Jean Delvare 提交于
The probe method used by i2c_new_probed_device() may not be suitable for all cases. Let the caller provide its own, optional probe function. Signed-off-by: NJean Delvare <khali@linux-fr.org> Acked-by: NMauro Carvalho Chehab <mchehab@redhat.com>
-
由 Julia Lawall 提交于
Use memdup_user when user data is immediately copied into the allocated region. Note that in the second case, the ++i is no longer necessary, as the last value is already freed if needed by the call to memdup_user. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: NJulia Lawall <julia@diku.dk> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
由 Joe Perches 提交于
Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NJean Delvare <khali@linux-fr.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 5 次提交
-
-
由 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>
-