Edit init.rc
as following:
on early-init
# Prepare early debugfs
mount debugfs none /sys/kernel/debug
chmod 0755 /sys/kernel/debug/tracing
# Enable i2c tracer
write /sys/kernel/debug/tracing/current_tracer "nop"
write /sys/kernel/debug/tracing/events/i2c/enable 1
write /sys/kernel/debug/tracing/tracing_on 1
rk3399_mid:/ # cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 90/90 #P:6
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
irq/175-gt1x-152 [000] ...1 24.064520: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.064535: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.064543: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.064547: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.065125: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.065129: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.065150: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.065154: i2c_read: i2c-3 #1 a=014 f=0001 l=11
irq/175-gt1x-152 [000] ...1 24.066633: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.066638: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.066643: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.066646: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.067230: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.067234: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.067254: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.067257: i2c_read: i2c-3 #1 a=014 f=0001 l=11
irq/175-gt1x-152 [000] ...1 24.068733: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.068737: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.068743: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.068746: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.069337: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.069341: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.069362: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.069365: i2c_read: i2c-3 #1 a=014 f=0001 l=11
irq/175-gt1x-152 [000] ...1 24.071102: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.071107: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.071114: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.071117: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.072062: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.072067: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.072091: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.072095: i2c_read: i2c-3 #1 a=014 f=0001 l=11
irq/175-gt1x-152 [000] ...1 24.073686: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.073690: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.073697: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.073700: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.074292: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.074297: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.074319: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.074323: i2c_read: i2c-3 #1 a=014 f=0001 l=11
irq/175-gt1x-152 [000] ...1 24.075846: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.075851: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.075857: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.075860: i2c_read: i2c-3 #1 a=014 f=0001 l=1
cfinteractive-50 [005] ...1 24.076409: i2c_write: i2c-0 #0 a=040 f=0000 l=1 [00]
cfinteractive-50 [005] ...1 24.076415: i2c_read: i2c-0 #1 a=040 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.076708: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.076713: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.076736: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.076739: i2c_read: i2c-3 #1 a=014 f=0001 l=11
cfinteractive-50 [005] ...1 24.077249: i2c_reply: i2c-0 #1 a=040 f=0001 l=1 [89]
cfinteractive-50 [005] ...1 24.077252: i2c_result: i2c-0 n=2 ret=2
cfinteractive-50 [005] ...1 24.077260: i2c_write: i2c-0 #0 a=040 f=0000 l=1 [00]
cfinteractive-50 [005] ...1 24.077262: i2c_read: i2c-0 #1 a=040 f=0001 l=1
cfinteractive-50 [005] ...1 24.078132: i2c_reply: i2c-0 #1 a=040 f=0001 l=1 [89]
cfinteractive-50 [005] ...1 24.078134: i2c_result: i2c-0 n=2 ret=2
cfinteractive-50 [005] ...1 24.078138: i2c_write: i2c-0 #0 a=040 f=0000 l=1 [00]
cfinteractive-50 [005] ...1 24.078139: i2c_read: i2c-0 #1 a=040 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.078341: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.078346: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.078365: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.078369: i2c_read: i2c-3 #1 a=014 f=0001 l=1
cfinteractive-50 [005] ...1 24.078838: i2c_reply: i2c-0 #1 a=040 f=0001 l=1 [89]
cfinteractive-50 [005] ...1 24.078841: i2c_result: i2c-0 n=2 ret=2
cfinteractive-50 [005] ...1 24.078847: i2c_write: i2c-0 #0 a=040 f=0000 l=1 [00]
cfinteractive-50 [005] ...1 24.078848: i2c_read: i2c-0 #1 a=040 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.078942: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.078946: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.078969: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.078972: i2c_read: i2c-3 #1 a=014 f=0001 l=11
cfinteractive-50 [005] ...1 24.079393: i2c_reply: i2c-0 #1 a=040 f=0001 l=1 [89]
cfinteractive-50 [005] ...1 24.079396: i2c_result: i2c-0 n=2 ret=2
cfinteractive-50 [005] ...1 24.079400: i2c_write: i2c-0 #0 a=040 f=0000 l=2 [00-8b]
cfinteractive-50 [005] ...1 24.079861: i2c_result: i2c-0 n=1 ret=1
irq/175-gt1x-152 [000] ...1 24.080518: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.080522: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.080528: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.080531: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.081106: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.081110: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.081131: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.081134: i2c_read: i2c-3 #1 a=014 f=0001 l=11
irq/175-gt1x-152 [000] ...1 24.082618: i2c_reply: i2c-3 #1 a=014 f=0001 l=11 [00-00-80-00-00-00-00-00-00-00-00]
irq/175-gt1x-152 [000] ...1 24.082622: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.082628: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [80-44]
irq/175-gt1x-152 [000] ...1 24.082631: i2c_read: i2c-3 #1 a=014 f=0001 l=1
irq/175-gt1x-152 [000] ...1 24.083209: i2c_reply: i2c-3 #1 a=014 f=0001 l=1 [ff]
irq/175-gt1x-152 [000] ...1 24.083213: i2c_result: i2c-3 n=2 ret=2
irq/175-gt1x-152 [000] ...1 24.083234: i2c_write: i2c-3 #0 a=014 f=0000 l=2 [81-4e]
irq/175-gt1x-152 [000] ...1 24.083237: i2c_read: i2c-3 #1 a=014 f=0001 l=11