[ERD][NEUS7920-76] [COMMON] i2c: core: Add Debug Snapshot Feature for I2C
authorKyungwoo Kang <kwoo.kang@samsung.com>
Mon, 20 Aug 2018 05:36:09 +0000 (14:36 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:33 +0000 (20:23 +0300)
Since 9820, a debugging feature has been changed
from Exynos snapshot to Debug snapshot.
This is a new porting of Debug snapshot

Change-Id: I671485ed64629c2d00504b13058bcfa0a9282447
Signed-off-by: Kyungwoo Kang <kwoo.kang@samsung.com>
drivers/i2c/i2c-core-base.c

index be29328127a4bac443efd896df8238583fe43e73..e1f44549ff1e998c0e7593f206014721ab541a36 100644 (file)
@@ -46,6 +46,7 @@
 #include <linux/property.h>
 #include <linux/rwsem.h>
 #include <linux/slab.h>
+#include <linux/debug-snapshot.h>
 
 #include "i2c-core.h"
 
@@ -1951,7 +1952,9 @@ int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
                        i2c_lock_bus(adap, I2C_LOCK_SEGMENT);
                }
 
+               dbg_snapshot_i2c(adap, msgs, num, DSS_FLAG_IN);
                ret = __i2c_transfer(adap, msgs, num);
+               dbg_snapshot_i2c(adap, msgs, num, DSS_FLAG_OUT);
                i2c_unlock_bus(adap, I2C_LOCK_SEGMENT);
 
                return ret;