Commit 165c6bd
committed
i2c: imx: fix missing stop condition in single-master mode
JIRA: https://issues.redhat.com/browse/RHEL-116101
commit 768776d
Author: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Date: Mon Dec 16 16:16:40 2024 +0100
i2c: imx: fix missing stop condition in single-master mode
A regression was introduced with the implementation of single-master
mode, preventing proper stop conditions from being generated. Devices
that require a valid stop condition, such as EEPROMs, fail to function
correctly as a result.
The issue only affects devices with the single-master property enabled.
This commit resolves the issue by re-enabling I2C bus busy bit (IBB)
polling for single-master mode when generating a stop condition. The fix
further ensures that the i2c_imx->stopped flag is cleared at the start
of each transfer, allowing the stop condition to be correctly generated
in i2c_imx_stop().
According to the reference manual (IMX8MMRM, Rev. 2, 09/2019, page
5270), polling the IBB bit to determine if the bus is free is only
necessary in multi-master mode. Consequently, the IBB bit is not polled
for the start condition in single-master mode.
Fixes: 6692694 ("i2c: imx: do not poll for bus busy in single master mode")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Link: https://lore.kernel.org/r/20241216151829.74056-1-eichest@gmail.com
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Jared Kangas <jkangas@redhat.com>1 parent 7638826 commit 165c6bd
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| 535 | + | |
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | 539 | | |
542 | 540 | | |
543 | 541 | | |
544 | 542 | | |
545 | | - | |
| 543 | + | |
546 | 544 | | |
547 | 545 | | |
548 | 546 | | |
549 | 547 | | |
550 | | - | |
| 548 | + | |
551 | 549 | | |
552 | 550 | | |
553 | 551 | | |
| |||
0 commit comments