[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)
committerKim Gunho <gunho.kim@samsung.com>
Fri, 30 Aug 2019 07:58:56 +0000 (16:58 +0900)
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 37197a764f6240cbb7d55309fe870590c315946d..9b3907b89705aa5f06ff633f3bb27814e9ab29ef 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/property.h>
 #include <linux/rwsem.h>
 #include <linux/slab.h>
+#include <linux/debug-snapshot.h>
 
 #include "i2c-core.h"
 
@@ -1947,7 +1948,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;