An error occurred fetching the project authors.
- 23 Apr, 2015 1 commit
-
-
Wolfram Sang authored
My Pengutronix address is not valid anymore, redirect people to the Pengutronix kernel team. Reported-by:
Harald Geyer <harald@ccbib.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Acked-by:
Robert Schwebel <r.schwebel@pengutronix.de>
-
- 15 Mar, 2015 1 commit
-
-
Nicholas Mc Guire authored
Return type of wait_for_completion_timeout is unsigned long not int. An appropriately named unsigned long is added and the assignment fixed up. Signed-off-by:
Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 10 Nov, 2014 1 commit
-
-
Fabio Estevam authored
According to Documentation/CodingStyle - Chapter 14: "The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed to a memory allocator is not." So do it as recommeded. Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 20 Oct, 2014 1 commit
-
-
Wolfram Sang authored
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 03 Oct, 2014 1 commit
-
-
Janusz Użycki authored
i2cdetect scanned i2c bus slow because the i2c-mxs driver ignored the NO_SLAVE_ACK bit during busy-waiting loop. Thanks to the patch, the speedup happens. Signed-off-by:
Janusz Uzycki <j.uzycki@elproma.com.pl> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 20 Sep, 2014 1 commit
-
-
Janusz Użycki authored
If I2C_M_RD flag is set SELECT command is sent and afterward READ command. The patch fixes READ command to return READ failure error message instead of SELECT failure error message. Signed-off-by:
Janusz Uzycki <j.uzycki@elproma.com.pl> Acked-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 10 Mar, 2014 1 commit
-
-
Jingoo Han authored
Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because the value is checked by devm_ioremap_resource(). Signed-off-by:
Jingoo Han <jg1.han@samsung.com> Acked-by:
Shawn Guo <shawn.guo@linaro.org> Acked-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 15 Nov, 2013 1 commit
-
-
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>
-
- 10 Oct, 2013 1 commit
-
-
Wolfram Sang authored
Subsystems like pinctrl and gpio rightfully make use of deferred probing at core level. Now, deferred drivers won't be retried if they don't have a .probe function specified in the driver struct. Fix this driver to have that, so the devices it supports won't get lost in a deferred probe. Acked-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 06 Oct, 2013 3 commits
-
-
Marek Vasut authored
The i.MX23 I2C controller is also capable of PIO, but needs a little harder push to behave. The controller needs to be reset after every PIO/DMA operation for some reason, otherwise in rare cases, the controller can hang or emit bytes onto the bus. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Marek Vasut authored
Analyze and rework the PIO mode operation. The PIO mode operation was unreliable on MX28, by analyzing the bus with LA, the checks for when data were available or were to be sent were wrong. The PIO WRITE has to be completely reworked as it multiple problems. The MX23 datasheet helped here, see comments in the code for details. The problems boil down to: - RUN bit in CTRL0 must be set after DATA register was written - The PIO transfer must be 4 bytes long tops, otherwise use clock stretching. Both of these fixes are implemented. The PIO READ operation can only be done for up to four bytes as we are unable to read out the data from the DATA register fast enough. This patch also tries to document the investigation within the code. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Juergen Beisert authored
It seems the PIO mode does not work, or at least not like it works on a i.MX28. Each short transfer needs about one second (without an error message) but does not send anything on the I2C lines. Signed-off-by:
Juergen Beisert <jbe@pengutronix.de> Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 23 Aug, 2013 1 commit
-
-
Wolfram Sang authored
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows that it is much cleaner to have this in the core. This also removes a circular dependency between the helpers and the core, and so we can finally register child nodes in the core instead of doing this manually in each driver. So, fix the drivers and documentation, too. Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 16 Aug, 2013 1 commit
-
-
Lothar Waßmann authored
The timing calculation is rather bogus and gives extremely wrong results for higher frequencies (on an i.MX28). E.g. instead of 400 kHz I measured 770 kHz. Implement a calculation that adheres to the I2C spec and gives exact results for I2C frequencies from 12.56 kHz to 960 kHz. Also the bus_free and leadin parameters are programmed according to the I2C spec for standard and fast mode. This was tested on a Ka-Ro TX28 module with a DS1339, TSC2007, PCA9554 and SGTL5000 client. Signed-off-by:
Lothar Waßmann <LW@KARO-electronics.de> Acked-by:
Marek Vasut <marex@denx.de> [wsa: patch fixes whitespace issue, too] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 15 Aug, 2013 1 commit
-
-
Fabio Estevam authored
stmp_reset_block() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Acked-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 05 Aug, 2013 1 commit
-
-
Fabio Estevam authored
Recently we have been seing some reports about PIO mode not working properly. - http://www.spinics.net/lists/linux-i2c/msg11985.html - http://marc.info/?l=linux-i2c&m=137235593101385&w=2 - https://lkml.org/lkml/2013/6/24/430 Let's use DMA mode even for small transfers. Without this patch, i2c reads the incorrect sgtl5000 version on a mx28evk when touchscreen is enabled: [ 5.856270] sgtl5000 0-000a: Device with ID register 0 is not a sgtl5000 [ 9.877307] sgtl5000 0-000a: ASoC: failed to probe CODEC -19 [ 9.883528] mxs-sgtl5000 sound.12: ASoC: failed to instantiate card -19 [ 9.892955] mxs-sgtl5000 sound.12: snd_soc_register_card failed (-19) Cc: <stable@vger.kernel.org> Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Acked-by:
Shawn Guo <shawn.guo@linaro.org> Acked-by:
Lucas Stach <l.stach@pengutronix.de> Acked-by:
Marek Vasut <marex@denx.de> [wsa: we have a proper solution for -next, so this non intrusive solution is OK for now] Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 12 Jun, 2013 1 commit
-
-
Fabio Estevam authored
Since commit ab78029e (drivers/pinctrl: grab default handles from device core), we can rely on device core for handling pinctrl. So remove devm_pinctrl_get_select_default() from the driver. Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 15 Apr, 2013 2 commits
-
-
Lucas Stach authored
In PIO mode we can end up with the same errors as in DMA mode, but as IRQs are disabled there we have to check for them manually after each command. Also don't use the big controller reset hammer when receiving a NAK from a slave. It's sufficient to tell the controller to continue at a clean state. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Tested-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Lucas Stach authored
This commit fixes the three following races in PIO code: - The CTRL0 register is racy in itself, when programming transfer state and run bit in the same cycle the hardware sometimes ends up using the state from the last transfer. Fix this by programming state in one cycle, make sure the write is flushed down APBX bus by reading back the reg and only then trigger the run bit. - Only clear the DMAREQ bit in DEBUG0 after the read/write to the data reg happened. Otherwise we are racing with the hardware about who touches the data reg first. - When checking for completion of a transfer it's not sufficient to check if the data engine finished, but also a check for i2c bus idle is needed. In PIO mode we are really fast to program the next transfer after a finished one, so the controller possibly tries to start a new transfer while the clkgen engine is still busy writing the NAK/STOP from the last transfer to the bus. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 04 Apr, 2013 1 commit
-
-
Shawn Guo authored
With the generic DMA device tree helper supported by mxs-dma driver, client devices only need to call dma_request_slave_channel() for requesting a DMA channel from dmaengine. Signed-off-by:
Shawn Guo <shawn.guo@linaro.org> Reviewed-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 02 Apr, 2013 1 commit
-
-
Lars-Peter Clausen authored
i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Acked-by:
Ben Hutchings <bhutchings@solarflare.com> Reviewed-by:
Jean Delvare <khali@linux-fr.org> Acked-by:
Shawn Guo <shawn.guo@linaro.org> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- 21 Feb, 2013 1 commit
-
-
Doug Anderson authored
There is simply no reason to be manually setting the private driver data to NULL in the remove/fail to probe cases. This is just extra cruft code that can be removed. A few notes: * Nothing relies on drvdata being set to NULL. * The __device_release_driver() function eventually calls dev_set_drvdata(dev, NULL) anyway, so there's no need to do it twice. * I verified that there were no cases where xxx_get_drvdata() was being called in these drivers and checking for / relying on the NULL return value. This could be cleaned up kernel-wide but for now just take the baby step and remove from the i2c subsystem. Reported-by:
Wolfram Sang <wsa@the-dreams.de> Reported-by:
Stephen Warren <swarren@wwwdotorg.org> Signed-off-by:
Doug Anderson <dianders@chromium.org> Reviewed-by:
Jean Delvare <khali@linux-fr.org> Acked-by:
Peter Korsgaard <jacmet@sunsite.dk> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <wolfram@the-dreams.de>
-
- 10 Feb, 2013 1 commit
-
-
Marek Vasut authored
This patch drops the i2c timing tables from this driver and instead derives the timing based from the requested clock sleep. The timing tables were completely wrong anyway when observed on a scope. This new algorithm is also only derived by using a scope, but it seems to produce much more accurate result. Signed-off-by:
Marek Vasut <marex@denx.de> Tested-by:
Shawn Guo <shawn.guo@linaro.org> [wsa: changed messages from dev_err to dev_warn] Signed-off-by:
Wolfram Sang <wolfram@the-dreams.de>
-
- 28 Jan, 2013 1 commit
-
-
Marek Vasut authored
Add support for the PIO mode and mixed PIO/DMA mode support. The mixed PIO/DMA is the default mode of operation. This shall leverage overhead that the driver creates due to setting up DMA descriptors even for very short transfers. The current boundary between PIO/DMA 8 bytes, transfers shorter than 8 bytes are transfered by PIO, longer transfers use DMA. The performance of write transfers remains unchanged, while there is a minor improvement of read performance. Reading 16KB EEPROM with DMA-only operations gives a read speed of 39.5KB/s, while with then new mixed-mode the speed is blazing 40.6KB/s. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 22 Jan, 2013 1 commit
-
-
Fabio Estevam authored
cmd_err is used to handle error code, so it should not be unsigned. This fixes the following warning when building with W=1 option: drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg': drivers/i2c/busses/i2c-mxs.c:331:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by:
Fabio Estevam <fabio.estevam@freescale.com> Acked-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de> Cc: stable@kernel.org
-
- 21 Jan, 2013 1 commit
-
-
Marek Vasut authored
The init_completion() call does reinit not only the variable carrying the flag that the completion finished, but also initialized the waitqueue associated with the completion. On the contrary, the INIT_COMPLETION() call only reinits the flag. In case there was anything still stuck in the waitqueue, subsequent call to init_completion() would be able to create possible race condition. This patch uses the proper function and moves init_completion() into .probe() call of the driver, to be issued only once. Note that such scenario is impossible, since two threads can never enter the mxs_i2c_xfer_msg(), since whole this section is protected by mutex in I2C core. This by no means allows this issue to exit though. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 22 Dec, 2012 1 commit
-
-
Bill Pemberton authored
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by:
Bill Pemberton <wfp5p@virginia.edu> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> (for ocores and mux-gpio) Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> (for i2c-gpio) Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> (for puf3) Acked-by: Barry Song <baohua.song@csr.com> (for sirf) Reviewed-by:
Jean Delvare <khali@linux-fr.org> [wsa: Fixed "foo* bar" flaws while we are here] Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 22 Nov, 2012 3 commits
-
-
Marek Vasut authored
Properly terminate the DMA transfer in case the DMA PIO transfer or setup fails for any reason. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
Marek Vasut authored
There is no reason to disable the I2C SMBus quick mode on this IP block. Enable it. This essentially fixes the problem with the "i2c-detect" command for probing the bus. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
Marek Vasut authored
Properly terminate the DMA transfer in case the DMA PIO transfer or setup fails for any reason. Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 02 Nov, 2012 1 commit
-
-
Wolfram Sang authored
This I2C master can do DMA and PIOQUEUE (PIO with FIFO). Originally, only PIOQUEUE was supported and it had issues, then DMA support was added this cycle. The original intention was to keep PIOQUEUE since it has less overhead what is nice for small transfers. However, runtime switching between PIOQEUE and DMA depending on the transfer size never worked despite a lot of trying. Since PIOQUEUE mode itself was flaky (polling at places where interrupts failed to work) and the implementation also imposed a size limit for transfers, it is best to remove the support, so users don't fall over its limitations. It also makes the driver a lot cleaner and more robust. If somebody really wants less overhead, plain PIO mode could still be implemented with the addidtional advantage that this mode is also available on MX23, too. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de> Reviewed-by:
Marek Vasut <marex@denx.de>
-
- 08 Oct, 2012 1 commit
-
-
Marek Vasut authored
This patch implements DMA support into mxs-i2c. DMA transfers are now enabled via DT. The DMA operation is enabled by default. Signed-off-by:
Marek Vasut <marex@denx.de> Tested-by:
Fabio Estevam <fabio.estevam@freescale.com> [wsa: rebased to 3.6-rc7] Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 12 Sep, 2012 1 commit
-
-
Wolfram Sang authored
Commit cd4f2d4a (i2c: mxs: Set I2C timing registers for mxs-i2c) only covered the case for devicetree and made platform_data based boards bail out with -EINVAL. Correctly support the latter one, too. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 13 Jul, 2012 1 commit
-
-
Marek Vasut authored
This patch configures the I2C bus timing registers according to information passed via DT. Currently, 100kHz and 400kHz modes are supported. The TIMING2 register value is wrong in the documentation for i.MX28! This was found and fixed by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by:
Marek Vasut <marex@denx.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 09 Jul, 2012 1 commit
-
-
Marc Kleine-Budde authored
This patch mutes the false positive compiler warning: drivers/i2c/busses/i2c-mxs.c: In function 'mxs_i2c_xfer_msg': drivers/i2c/busses/i2c-mxs.c:206:8: warning: 'data' may be used uninitialized in this function [-Wuninitialized] drivers/i2c/busses/i2c-mxs.c:196:6: note: 'data' was declared here Signed-off-by:
Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 13 May, 2012 1 commit
-
-
Shawn Guo authored
Add device tree probe support for i2c-mxs driver. So far, it's only been tested on imx28. Signed-off-by:
Shawn Guo <shawn.guo@linaro.org> Acked-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 12 May, 2012 1 commit
-
-
Shawn Guo authored
Cc: linux-i2c@vger.kernel.org Cc: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by:
Shawn Guo <shawn.guo@linaro.org>
-
- 27 Apr, 2012 1 commit
-
-
Wolfram Sang authored
Since the last fixes to this driver ensure now the queue termination is done correctly, we can finally disable the queue after a transfer without problems. The gain is that it will only be reenabled after the next transfer is fully set up. Before, the queue was running all the time and if the setup of the next message was interrupted by another thread, an incomplete buffer could have been sent, padded with zeroes. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 25 Apr, 2012 1 commit
-
-
Wolfram Sang authored
After an error interrupt setting cmd->err, I see another interrupt that the data engine is empty which clears cmd->err before being processed. So, clear cmd->err at the beginning of a transfer only to handle these consecutive interrupts. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-
- 20 Apr, 2012 1 commit
-
-
Wolfram Sang authored
The former mach specific reset_block function has been converted to a global one. Use the new one to remove mach dependency from the driver. Signed-off-by:
Wolfram Sang <w.sang@pengutronix.de>
-