- Oct 01, 2024
-
-
Like other i2c controllers we see deadlock issues with clock prepare mutex. In our case this came up with a clock output of a rtc connected to i2c bus. This issue has already been fixed upstream by: (d9a22d71) i2c: imx: avoid taking clk_prepare mutex in PM callbacks But was reintroduced by a wrongly resolved merge conflict with this commit: (d59c7185) MLK-11403: I2C: imx: restore pin setting for i2c So again we keep the i2c clock prepared and only enable and disable it for a transfer. REFERENCE: https://github.com/nxp-imx/linux-imx/pull/21
-
As clk_get_rate() also keeps the clk prepare lock which can lead into a deadlock. It was removed upstream with this commit: (90ad2cbe) i2c: imx: use clk notifier for rate changes But it has been readded again with: (d2561688) MLK-20368 i2c-imx: Coverity: fix divide by zero warning The commit message does not explain why it was readded. It is not needed as the clk notifier is used. Removed it again. REFERENCE: https://github.com/nxp-imx/linux-imx/pull/21
-
- Sep 28, 2023
-
-
Gianfranco Mariotti authored
Workaround for NXP chip errata ERR007805 "I2C: When the I2C clock speed is configured for 400 kHz, the SCL low period violates the I2C spec of 1.3 uS min" This errata is found on the following SoCs: * MX8M{M,N,P,Q} * MX7{S,D} * MX6{UL{,L,Z},S{,LL,X},S,D,DL,Q,DP,QP} Implement the workaround by matching on the affected SoC specific compatible strings and by limiting the maximum bus frequency in case the SoC is affected. REFERENCE: https://lore.kernel.org/linux-arm-kernel/YlngkTlsJ8M1gB3z@shikoro/T/
-
- May 14, 2021
-
-
Qinglang Miao authored
[ Upstream commit 47ff6172 ] In i2c_imx_xfer() and i2c_imx_remove(), the pm reference count is not expected to be incremented on return. However, pm_runtime_get_sync will increment pm reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 3a5ee18d ("i2c: imx: implement master_xfer_atomic callback") Reported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Qinglang Miao <miaoqinglang@huawei.com> Reviewed-by:
Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@kernel.org> Signed-off-by:
Sasha Levin <sashal@kernel.org>
-
- Dec 14, 2020
-
-
Clark Wang authored
If add this arbitration check, it will block camera probe on imx7D-sdb. So remove this check for now to avoid blocking camera function in TC release. Repreduce step: 1. Write 0x42 to 0x3008 reg 2. Write 0x2 to 0x3008 reg Then the arbitration lost flag will be set. Reviewed-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
Add the missing pm_runtime_disable() to keep the balance of power.disable_depth in i2c_imx_xfer function. Otherwise, after resumed, warning log will be shown: imx-i2c 30a20000.i2c: Unbalanced pm_runtime_enable! Reviewed-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Biwen Li authored
Auto switch mode between master and slave Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Biwen Li authored
Support I2C_SLAVE_STOP event for the read transactions(master read from slave) Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Biwen Li authored
Fix warning as follows, drivers/i2c/busses/i2c-imx.c:1046:7: warning: unused variable ‘enable_runtime_pm’ [-Wunused-variable] bool enable_runtime_pm = false; Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Biwen Li authored
The patch supports slave mode for imx I2C driver Reviewed-by:
Clark Wang <xiaoning.wang@nxp.com> Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Zhang Ying-22455 authored
Based on the I2C specification, if the data line (SDA) is stuck low, the master should send nine clock pulses. The I2C slave device that held the bus low should release it sometime within those nine clocks. Because pinctrl is not supported on Layerscape, current bus recovery is not avalible for Layerscape. This patch uses an open drain GPIO pin to connect to the IICx_SCL to drive nine clock pulses to unlock the I2C bus. Signed-off-by:
Zhang Ying-22455 <ying.zhang22455@nxp.com> Reviewed-by:
Clark Wang <xiaoning.wang@nxp.com> Signed-off-by:
Biwen Li <biwen.li@nxp.com>
-
Zhang Ying-22455 authored
ERR010027: Attempting a start cycle while the bus is busy may generate a short clock pulse. Software must ensure that the I2C BUS is idle by checking the bus busy before switching to master mode and attempting a Start cycle. Signed-off-by:
Zhang Ying-22455 <ying.zhang22455@nxp.com> [ Aisheng: fix big conflict due to 3a5ee18d ("i2c: imx: implement master_xfer_atomic callback") ] Sign-off-by:
Dong Aisheng <aisheng.dong@nxp.com>
-
Peng Ma authored
DMA might not be available yet when the i2c device probes. Properly handle EPROBE_DEFER on dma channel allocation by passing on this error. Signed-off-by:
Peng Ma <peng.ma@nxp.com>
-
Clark Wang authored
Switching the clock frequently will affect the data transmission efficiency, and prolong the timeout to reduce autosuspend times for i2c-imx. Acked-by:
Fugang Duan <fugang.duan@nxp.com> Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com>
-
Clark Wang authored
"i2c_clk_rate / 2" might be zero when the i2c_clk_rate gets the clock is 0 or 1, so add a judgment to avoid the denominator is equal to 0. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> [Arul: Add support to check return value everywhere in the driver] Signed-off-by:
Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com> Signed-off-by:
Shrikant Bobade <Shrikant_Bobade@mentor.com> (cherry picked from commit d382de595bffc0975ab7c0582e08dd4f7afc0c1a) (cherry picked from commit 456caa9b)
-
Clark Wang authored
According the e7805 in Errata, the SCK low level period should be less than 1.3us. The other series platform use this same IP can match the errata, and ensure the low level period longer than 1.3us when the speed set to 400KHz. However, only at imx7d platform, the low level period is less than 1.3us in the same situation. Therefore, limit the maximum transfer speed to 384KHz when probe at imx7d platform. Signed-off-by:
Clark Wang <xiaoning.wang@nxp.com> (cherry picked from commit 19f553846e872b5c379b37ed029132b79566cab0) (cherry picked from commit 5d355407)
-
Gao Pan authored
When we do system suspend, the runtime pm will be disabled, but we need to control the PMIC to power on/off the regulator, if the runtime pm is disabled, if will failed to request runtime wakeup. So data transfer will failed. Signed-off-by:
Bai Ping <ping.bai@nxp.com> Signed-off-by:
Gao Pan <pandy.gao@nxp.com> Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 93adab71) [ Aisheng: fix big conflict due to 3a5ee18d ("i2c: imx: implement master_xfer_atomic callback") ] Sign-off-by:
Dong Aisheng <aisheng.dong@nxp.com>
-
Gao Pan authored
restore pin setting for i2c in suspend/resume Signed-off-by:
Gao Pan <gaopan@freescale.com> (Vipul: Fixed merge conflicts) Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit 42b5aa1d)
-
gaopan authored
The i2c irq is masked when pcie starts a i2c transfer process during noirq suspend stage. As a result, i2c transfer fails. To solve the problem, IRQF_NO_SUSPEND is added to i2c bus. Signed-off-by:
Gao Pan <b54642@freescale.com> Signed-off-by:
Fugang Duan <B38611@freescale.com> Signed-off-by:
Vipul Kumar <vipul_kumar@mentor.com> (cherry picked from commit d21259d9)
-
- Dec 02, 2020
-
-
Christian Eggers authored
If arbitration is lost, the master automatically changes to slave mode. I2SR_IBB may or may not be reset by hardware. Raising a STOP condition by resetting I2CR_MSTA has no effect and will not clear I2SR_IBB. So calling i2c_imx_bus_busy() is not required and would busy-wait until timeout. Signed-off-by:
Christian Eggers <ceggers@arri.de> Tested (not extensively) on Vybrid VF500 (Toradex VF50): Tested-by:
Krzysztof Kozlowski <krzk@kernel.org> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Cc: stable@vger.kernel.org # Requires trivial backporting, simple remove # the 3rd argument from the calls to # i2c_imx_bus_busy(). Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
Christian Eggers authored
Arbitration Lost (IAL) can happen after every single byte transfer. If arbitration is lost, the I2C hardware will autonomously switch from master mode to slave. If a transfer is not aborted in this state, consecutive transfers will not be executed by the hardware and will timeout. Signed-off-by:
Christian Eggers <ceggers@arri.de> Tested (not extensively) on Vybrid VF500 (Toradex VF50): Tested-by:
Krzysztof Kozlowski <krzk@kernel.org> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Cc: stable@vger.kernel.org Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
Christian Eggers authored
According to the "VFxxx Controller Reference Manual" (and the comment block starting at line 97), Vybrid requires writing a one for clearing an interrupt flag. Syncing the method for clearing I2SR_IIF in i2c_imx_isr(). Signed-off-by:
Christian Eggers <ceggers@arri.de> Fixes: 4b775022 ("i2c: imx: add struct to hold more configurable quirks") Reviewed-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Cc: stable@vger.kernel.org Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
- Oct 10, 2020
-
-
Wolfram Sang authored
This reverts commit fa4d3055. An updated version was sent. So, revert this version and give the new version more time for testing. Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
- Oct 08, 2020
-
-
Christian Eggers authored
According to the "VFxxx Controller Reference Manual" (and the comment block starting at line 97), Vybrid requires writing a one for clearing an interrupt flag. Syncing the method for clearing I2SR_IIF in i2c_imx_isr(). Signed-off-by:
Christian Eggers <ceggers@arri.de> Fixes: 4b775022 ("i2c: imx: add struct to hold more configurable quirks") Reviewed-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: stable@vger.kernel.org Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
- Sep 27, 2020
-
-
Krzysztof Kozlowski authored
If interrupt comes late, during probe error path or device remove (could be triggered with CONFIG_DEBUG_SHIRQ), the interrupt handler i2c_imx_isr() will access registers with the clock being disabled. This leads to external abort on non-linefetch on Toradex Colibri VF50 module (with Vybrid VF5xx): Unhandled fault: external abort on non-linefetch (0x1008) at 0x8882d003 Internal error: : 1008 [#1] ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 5.7.0 #607 Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) (i2c_imx_isr) from [<8017009c>] (free_irq+0x25c/0x3b0) (free_irq) from [<805844ec>] (release_nodes+0x178/0x284) (release_nodes) from [<80580030>] (really_probe+0x10c/0x348) (really_probe) from [<80580380>] (driver_probe_device+0x60/0x170) (driver_probe_device) from [<80580630>] (device_driver_attach+0x58/0x60) (device_driver_attach) from [<805806bc>] (__driver_attach+0x84/0xc0) (__driver_attach) from [<8057e228>] (bus_for_each_dev+0x68/0xb4) (bus_for_each_dev) from [<8057f3ec>] (bus_add_driver+0x144/0x1ec) (bus_add_driver) from [<80581320>] (driver_register+0x78/0x110) (driver_register) from [<8010213c>] (do_one_initcall+0xa8/0x2f4) (do_one_initcall) from [<80c0100c>] (kernel_init_freeable+0x178/0x1dc) (kernel_init_freeable) from [<80807048>] (kernel_init+0x8/0x110) (kernel_init) from [<80100114>] (ret_from_fork+0x14/0x20) Additionally, the i2c_imx_isr() could wake up the wait queue (imx_i2c_struct->queue) before its initialization happens. The resource-managed framework should not be used for interrupt handling, because the resource will be released too late - after disabling clocks. The interrupt handler is not prepared for such case. Fixes: 1c4b6c3b ("i2c: imx: implement bus recovery") Cc: <stable@vger.kernel.org> Signed-off-by:
Krzysztof Kozlowski <krzk@kernel.org> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
- Sep 09, 2020
-
-
Anson Huang authored
dev_err_probe() can reduce code size, uniform error handling and record the defer probe reason etc., use it to simplify the code. Signed-off-by:
Anson Huang <Anson.Huang@nxp.com> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@kernel.org>
-
- Mar 24, 2020
-
-
Andy Shevchenko authored
Since we have generic definitions for bus frequencies, let's use them. Reviewed-by:
Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Acked-by:
Robert Richter <rrichter@marvell.com> Reviewed-by:
Thor Thayer <thor.thayer@linux.intel.com> Acked-by:
Elie Morisse <syniurge@gmail.com> Acked-by:
Nehal Shah <nehal-bakulchandra.shah@amd.com> Reviewed-by:
Brendan Higgins <brendanhiggins@google.com> Acked-by:
Scott Branden <scott.branden@broadcom.com> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by:
Baruch Siach <baruch@tkos.co.il> Reviewed-by:
Guenter Roeck <linux@roeck-us.net> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Acked-by:
Vladimir Zapolskiy <vz@mleia.com> Acked-by:
Gregory CLEMENT <gregory.clement@bootlin.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Reviewed-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by:
Chris Brandt <chris.brandt@renesas.com> Reviewed-by:
Baolin Wang <baolin.wang7@gmail.com> Reviewed-by:
Pierre-Yves MORDRET <pierre-yves.mordret@st.com> Acked-by:
Patrice Chotard <patrice.chotard@st.com> Acked-by:
Ard Biesheuvel <ardb@kernel.org> Reviewed-by:
Dmitry Osipenko <digetx@gmail.com> Acked-by:
Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Mar 21, 2020
-
-
Tang Bin authored
We don't need dev_err() message because when something goes wrong, platform_get_irq() has print an error message itself, so we should remove duplicate dev_err(). Signed-off-by:
Tang Bin <tangbin@cmss.chinamobile.com> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Feb 26, 2020
-
-
Stefan Lengfeld authored
Rework the read and write code paths in the driver to support operation in atomic contexts. To achieve this, the driver must not rely on IRQs and not call schedule(), e.g. via a sleep routine, in these cases. With this patch the driver supports normal operation, DMA transfers and now the polling mode or also called sleep-free or IRQ-less operation. It makes the code not simpler or easier to read, but atomic I2C transfers are needed on some hardware configurations, e.g. to trigger reboots on an external PMIC chip. Signed-off-by:
Stefan Lengfeld <contact@stefanchrist.eu> [m.felsch@pengutronix.de: integrate https://patchwork.ozlabs.org/patch/1085943/ review feedback] [m.felsch@pengutronix.de: adapt commit message] Signed-off-by:
Marco Felsch <m.felsch@pengutronix.de> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by:
Stefan Agner <stefan@agner.ch> Tested-by:
Stefan Lengfeld <contact@stefanchrist.eu> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Sep 13, 2019
-
-
Chuanhua Han authored
Enable NXP i2c controller to boot with ACPI. Signed-off-by:
Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com> Signed-off-by:
Udit Kumar <udit.kumar@nxp.com> Signed-off-by:
Chuanhua Han <chuanhua.han@nxp.com> Signed-off-by:
Biwen Li <biwen.li@nxp.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by:
Oleksij Rempel <o.rempel@pengutronix.de> Tested-by:
Oleksij Rempel <o.rempel@pengutronix.de> Acked-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Aug 14, 2019
-
-
Fabio Estevam authored
Since commit e1ab9a46 ("i2c: imx: improve the error handling in i2c_imx_dma_request()") when booting with the DMA driver as module (such as CONFIG_FSL_EDMA=m) the following endless clk warnings are seen: [ 153.077831] ------------[ cut here ]------------ [ 153.082528] WARNING: CPU: 0 PID: 15 at drivers/clk/clk.c:924 clk_core_disable_lock+0x18/0x24 [ 153.093077] i2c0 already disabled [ 153.096416] Modules linked in: [ 153.099521] CPU: 0 PID: 15 Comm: kworker/0:1 Tainted: G W 5.2.0+ #321 [ 153.107290] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree) [ 153.113772] Workqueue: events deferred_probe_work_func [ 153.118979] [<c0019560>] (unwind_backtrace) from [<c0014734>] (show_stack+0x10/0x14) [ 153.126778] [<c0014734>] (show_stack) from [<c083f8dc>] (dump_stack+0x9c/0xd4) [ 153.134051] [<c083f8dc>] (dump_stack) from [<c0031154>] (__warn+0xf8/0x124) [ 153.141056] [<c0031154>] (__warn) from [<c0031248>] (warn_slowpath_fmt+0x38/0x48) [ 153.148580] [<c0031248>] (warn_slowpath_fmt) from [<c040fde0>] (clk_core_disable_lock+0x18/0x24) [ 153.157413] [<c040fde0>] (clk_core_disable_lock) from [<c058f520>] (i2c_imx_probe+0x554/0x6ec) [ 153.166076] [<c058f520>] (i2c_imx_probe) from [<c04b9178>] (platform_drv_probe+0x48/0x98) [ 153.174297] [<c04b9178>] (platform_drv_probe) from [<c04b7298>] (really_probe+0x1d8/0x2c0) [ 153.182605] [<c04b7298>] (really_probe) from [<c04b7554>] (driver_probe_device+0x5c/0x174) [ 153.190909] [<c04b7554>] (driver_probe_device) from [<c04b58c8>] (bus_for_each_drv+0x44/0x8c) [ 153.199480] [<c04b58c8>] (bus_for_each_drv) from [<c04b746c>] (__device_attach+0xa0/0x108) [ 153.207782] [<c04b746c>] (__device_attach) from [<c04b65a4>] (bus_probe_device+0x88/0x90) [ 153.215999] [<c04b65a4>] (bus_probe_device) from [<c04b6a04>] (deferred_probe_work_func+0x60/0x90) [ 153.225003] [<c04b6a04>] (deferred_probe_work_func) from [<c004f190>] (process_one_work+0x204/0x634) [ 153.234178] [<c004f190>] (process_one_work) from [<c004f618>] (worker_thread+0x20/0x484) [ 153.242315] [<c004f618>] (worker_thread) from [<c0055c2c>] (kthread+0x118/0x150) [ 153.249758] [<c0055c2c>] (kthread) from [<c00090b4>] (ret_from_fork+0x14/0x20) [ 153.257006] Exception stack(0xdde43fb0 to 0xdde43ff8) [ 153.262095] 3fa0: 00000000 00000000 00000000 00000000 [ 153.270306] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 153.278520] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 153.285159] irq event stamp: 3323022 [ 153.288787] hardirqs last enabled at (3323021): [<c0861c4c>] _raw_spin_unlock_irq+0x24/0x2c [ 153.297261] hardirqs last disabled at (3323022): [<c040d7a0>] clk_enable_lock+0x10/0x124 [ 153.305392] softirqs last enabled at (3322092): [<c000a504>] __do_softirq+0x344/0x540 [ 153.313352] softirqs last disabled at (3322081): [<c00385c0>] irq_exit+0x10c/0x128 [ 153.320946] ---[ end trace a506731ccd9bd703 ]--- This endless clk warnings behaviour is well explained by Andrey Smirnov: "Allocating DMA after registering I2C adapter can lead to infinite probing loop, for example, consider the following scenario: 1. i2c_imx_probe() is called and successfully registers an I2C adapter via i2c_add_numbered_adapter() 2. As a part of i2c_add_numbered_adapter() new I2C slave devices are added from DT which results in a call to driver_deferred_probe_trigger() 3. i2c_imx_probe() continues and calls i2c_imx_dma_request() which due to lack of proper DMA driver returns -EPROBE_DEFER 4. i2c_imx_probe() fails, removes I2C adapter and returns -EPROBE_DEFER, which places it into deferred probe list 5. Deferred probe work triggered in #2 above kicks in and calls i2c_imx_probe() again thus bringing us to step #1" So revert commit e1ab9a46 ("i2c: imx: improve the error handling in i2c_imx_dma_request()") and restore the old behaviour, in order to avoid regressions on existing setups. Cc: <stable@vger.kernel.org> Reported-by:
Andrey Smirnov <andrew.smirnov@gmail.com> Reported-by:
Russell King <linux@armlinux.org.uk> Fixes: e1ab9a46 ("i2c: imx: improve the error handling in i2c_imx_dma_request()") Signed-off-by:
Fabio Estevam <festevam@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- May 27, 2019
-
-
Anson Huang authored
Use __maybe_unused for runtime PM related functions instead of #if CONFIG_PM to simply the code. Signed-off-by:
Anson Huang <Anson.Huang@nxp.com> Reviewed-by:
Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Apr 23, 2019
-
-
Anson Huang authored
The way of getting private imx_i2c_struct in i2c_imx_clk_notifier_call() is incorrect, should use clk_change_nb element to get correct address and avoid below kernel dump during POST_RATE_CHANGE notify by clk framework: Unable to handle kernel paging request at virtual address 03ef1488 pgd = (ptrval) [03ef1488] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events reduce_bus_freq_handler PC is at i2c_imx_set_clk+0x10/0xb8 LR is at i2c_imx_clk_notifier_call+0x20/0x28 pc : [<806a893c>] lr : [<806a8a04>] psr: a0080013 sp : bf399dd8 ip : bf3432ac fp : bf7c1dc0 r10: 00000002 r9 : 00000000 r8 : 00000000 r7 : 03ef1480 r6 : bf399e50 r5 : ffffffff r4 : 00000000 r3 : bf025300 r2 : bf399e50 r1 : 00b71b00 r0 : bf399be8 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 4e03004a DAC: 00000051 Process kworker/2:1 (pid: 38, stack limit = 0x(ptrval)) Stack: (0xbf399dd8 to 0xbf39a000) 9dc0: 806a89e4 00000000 9de0: ffffffff bf399e50 00000002 806a8a04 806a89e4 80142900 ffffffff 00000000 9e00: bf34ef18 bf34ef04 00000000 ffffffff bf399e50 80142d84 00000000 bf399e6c 9e20: bf34ef00 80f214c4 bf025300 00000002 80f08d08 bf017480 00000000 80142df0 9e40: 00000000 80166ed8 80c27638 8045de58 bf352340 03ef1480 00b71b00 0f82e242 9e60: bf025300 00000002 03ef1480 80f60e5c 00000001 8045edf0 00000002 8045eb08 9e80: bf025300 00000002 03ef1480 8045ee10 03ef1480 8045eb08 bf01be40 00000002 9ea0: 03ef1480 8045ee10 07de2900 8045eb08 bf01b780 00000002 07de2900 8045ee10 9ec0: 80c27898 bf399ee4 bf020a80 00000002 1f78a400 8045ee10 80f60e5c 80460514 9ee0: 80f60e5c bf01b600 bf01b480 80460460 0f82e242 bf383a80 bf383a00 80f60e5c 9f00: 00000000 bf7c1dc0 80f60e70 80460564 80f60df0 80f60d24 80f60df0 8011e72c 9f20: 00000000 80f60df0 80f60e6c bf7c4f00 00000000 8011e7ac bf274000 8013bd84 9f40: bf7c1dd8 80f03d00 bf274000 bf7c1dc0 bf274014 bf7c1dd8 80f03d00 bf398000 9f60: 00000008 8013bfb4 00000000 bf25d100 bf25d0c0 00000000 bf274000 8013bf88 9f80: bf25d11c bf0cfebc 00000000 8014140c bf25d0c0 801412ec 00000000 00000000 9fa0: 00000000 00000000 00000000 801010e8 00000000 00000000 00000000 00000000 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 [<806a893c>] (i2c_imx_set_clk) from [<806a8a04>] (i2c_imx_clk_notifier_call+0x20/0x28) [<806a8a04>] (i2c_imx_clk_notifier_call) from [<80142900>] (notifier_call_chain+0x44/0x84) [<80142900>] (notifier_call_chain) from [<80142d84>] (__srcu_notifier_call_chain+0x44/0x98) [<80142d84>] (__srcu_notifier_call_chain) from [<80142df0>] (srcu_notifier_call_chain+0x18/0x20) [<80142df0>] (srcu_notifier_call_chain) from [<8045de58>] (__clk_notify+0x78/0xa4) [<8045de58>] (__clk_notify) from [<8045edf0>] (__clk_recalc_rates+0x60/0xb4) [<8045edf0>] (__clk_recalc_rates) from [<8045ee10>] (__clk_recalc_rates+0x80/0xb4) Code: e92d40f8 e5903298 e59072a0 e1530001 (e5975008) ---[ end trace fc7f5514b97b6cbb ]--- Fixes: 90ad2cbe ("i2c: imx: use clk notifier for rate changes") Signed-off-by:
Anson Huang <Anson.Huang@nxp.com> Reviewed-by:
Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-
- Apr 06, 2019
-
-
Laurentiu Tudor authored
Make sure to free the i2c adapter on the error exit path. Signed-off-by:
Laurentiu Tudor <laurentiu.tudor@nxp.com> Reviewed-by:
Mukesh Ojha <mojha@codeaurora.org> Reviewed-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Fixes: e1ab9a46 ("i2c: imx: improve the error handling in i2c_imx_dma_request()") Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 22, 2019
-
-
YueHaibing authored
Change the call to PTR_ERR to access the value just tested by IS_ERR. Fixes: 5b3a23a3 ("i2c: imx: notify about real errors on dma i2c_imx_dma_request") Signed-off-by:
YueHaibing <yuehaibing@huawei.com> Reviewed-by:
Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by:
Esben Haabendal <esben@haabendal.dk> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Jan 15, 2019
-
-
Oleksij Rempel authored
Improve the error handling in i2c_imx_dma_request() and let it return an error indication that the caller then can handle accordingly. Signed-off-by:
Oleksij Rempel <o.rempel@pengutronix.de> Acked-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Oleksij Rempel authored
At least on i.MX5x, the DMA events for I2C and SDHC use the same channel and there can only be a single user. So in this case there should be no message emitted that looks like an error if the I2C device doesn't have an assigned DMA channel. In contrast real problems that were only emitted at debug level before should be described at a higher level to be better visible and so understandable. Signed-off-by:
Oleksij Rempel <o.rempel@pengutronix.de> Acked-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Nov 27, 2018
-
-
Lucas Stach authored
Probe deferral is a normal operating condition in the probe function, so don't spam the log with an error in this case. Signed-off-by:
Lucas Stach <l.stach@pengutronix.de> Acked-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Aug 20, 2018
-
-
Esben Haabendal authored
Always update the stopped state when busy status have been checked. This is identical to what was done before, with the exception of error handling. Without this change, some errors cause the stopped state to be left in incorrect state in i2c_imx_stop(), i2c_imx_dma_read(), i2c_imx_read() and i2c_imx_xfer(). Signed-off-by:
Esben Haabendal <eha@deif.com> Acked-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Esben Haabendal authored
This fixes a race condition, where the DMAEN bit ends up being set after I2C slave has transmitted a byte following the dummy read. When that happens, an interrupt is generated instead, and no DMA request is generated to kickstart the DMA read, and a timeout happens after DMA_TIMEOUT (1 sec). Fixed by setting the DMAEN bit before the dummy read. Signed-off-by:
Esben Haabendal <eha@deif.com> Acked-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
-