[PATCH] i2c-mv46xxx driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixing an inconvinience where a broken or loose connection could be only found with additional equipment occured when working with i2c and not figuring out why a connection sometimes failed even thought the cables measured alright enables developers to see the linestate on failure within dmesg no further equipment needed

Sorry if anything is improperly done. This is the first time I do this.


--- linux/drivers/i2c/busses/i2c-mv64xxx.c.orig    2024-03-15 08:33:07.606227057 +0100 +++ linux/drivers/i2c/busses/i2c-mv64xxx.c    2024-03-15 08:34:54.191439990 +0100
@@ -582,8 +582,9 @@ mv64xxx_i2c_wait_for_completion(struct m
             drv_data->state = MV64XXX_I2C_STATE_IDLE;
             dev_err(&drv_data->adapter.dev,
                 "mv64xxx: I2C bus locked, block: %d, "
-                "time_left: %d\n", drv_data->block,
-                (int)time_left);
+                "time_left: %d, LCR: %X\n", drv_data->block,
+                (int)time_left, (int)readl(drv_data->reg_base + 0x20));
+                /*LCR just a -> sda+scl low | 1a sda low | 2a scl low*/
             mv64xxx_i2c_hw_init(drv_data);
             i2c_recover_bus(&drv_data->adapter);
         }

Signed-off-by: Thore Olthoff <thore.olthoff@xxxxxxxxxxxxxxxxxxxxx>





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux