This is how it is found out.
Created a ‘extern void __iomem *variable’ and assigned the problem causing chip->base to it. Tried readb() after every suspend callback is returned.
It hung after ufs contoller suspend.
Also printed the device linked list and checked the order in linked list for ufs controller and gpio18.
Also I got a supporting statement from SoC reference manual regarding the relation between UFS controller and gpio18 and gpio19.
Issue in ffd72000.i2c (or i2c1) was solved. That fix was given by synopsis for their drivers,
in 4.13 mainline kernel I guess. Kernel version and source location I forgot.
Anyways while working in this, I have also verified, i2c1 gives suspend issues during suspend-to-mem, because it was already suspend by runtime PM kworker and the driver was not tracking its current state. We can see suspend callback is called even before rootfs is mounted.
In my opinion, setting dev->power.is_suspended after suspend
and check this before going again for suspend is enough.
Do such a check in resume call back as well.
Anyways I have not found similar code in
https://android.googlesource.com/kernel/hikey-linaro, branch: android-hikey-linaro-4.9
So I cannot submit my patch to the gerrit for i2c1 suspend fix.