Commit 093f70c
Wolfram Sang
i2c: rcar: fix NACK handling when being a target
When this controller is a target, the NACK handling had two issues.
First, the return value from the backend was not checked on the initial
WRITE_REQUESTED. So, the driver missed to send a NACK in this case.
Also, the NACK always arrives one byte late on the bus, even in the
WRITE_RECEIVED case. This seems to be a HW issue. We should then not
rely on the backend to correctly NACK the superfluous byte as well. Fix
both issues by introducing a flag which gets set whenever the backend
requests a NACK and keep sending it until we get a STOP condition.
Fixes: de20d18 ("i2c: rcar: add slave support")
Signed-off-by: Wolfram Sang <[email protected]>1 parent 385f2db commit 093f70c
1 file changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
| |||
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
| 171 | + | |
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| |||
655 | 658 | | |
656 | 659 | | |
657 | 660 | | |
| 661 | + | |
658 | 662 | | |
659 | 663 | | |
660 | 664 | | |
| |||
670 | 674 | | |
671 | 675 | | |
672 | 676 | | |
673 | | - | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
674 | 681 | | |
675 | 682 | | |
676 | 683 | | |
| |||
683 | 690 | | |
684 | 691 | | |
685 | 692 | | |
| 693 | + | |
686 | 694 | | |
687 | 695 | | |
688 | 696 | | |
689 | 697 | | |
690 | 698 | | |
691 | 699 | | |
692 | | - | |
693 | | - | |
694 | 700 | | |
695 | 701 | | |
696 | | - | |
697 | | - | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
698 | 708 | | |
699 | 709 | | |
700 | 710 | | |
| |||
0 commit comments