[bootlin/training-materials updates] master: kernel: i2c: Fix the SMBus example (328c1137)

Miquel Raynal miquel.raynal at bootlin.com
Mon Nov 15 10:47:12 CET 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/328c113700661e4a220e2f0efb4d4a3d8b519c48

>---------------------------------------------------------------

commit 328c113700661e4a220e2f0efb4d4a3d8b519c48
Author: Miquel Raynal <miquel.raynal at bootlin.com>
Date:   Mon Nov 15 10:45:10 2021 +0100

    kernel: i2c: Fix the SMBus example
    
    I2C/SMBus do not support two Start bits in the same sequence. It is
    actually a repeated start (abbreviated Sr) which must be performed after
    the command byte to signify that we change the direction of the flow:
    the host wrote the command, now it's the peripheral responsibility to
    talk on the bus.
    
    Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>


>---------------------------------------------------------------

328c113700661e4a220e2f0efb4d4a3d8b519c48
 slides/kernel-i2c/kernel-i2c.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/slides/kernel-i2c/kernel-i2c.tex b/slides/kernel-i2c/kernel-i2c.tex
index 4a6e732e..f6350799 100644
--- a/slides/kernel-i2c/kernel-i2c.tex
+++ b/slides/kernel-i2c/kernel-i2c.tex
@@ -374,7 +374,7 @@ From \kfile{drivers/input/touchscreen/st1232.c}
     to read one byte of data from a device ``register''.
     \begin{itemize}
     \item It does the following operations:
-      \code{S Addr Wr [A] Comm [A] S Addr Rd [A] [Data] NA P}
+      \code{S Addr Wr [A] Comm [A] Sr Addr Rd [A] [Data] NA P}
     \item Which means it first writes a one byte data command ({\em
         Comm}, which is the ``register'' address), and then reads
       back one byte of data ({\em [Data]}).




More information about the training-materials-updates mailing list