After testing I noticed that command
kodi-send -a "CECActivateSource"
brings cec working again after tv suspend/resume.
So I was thinking if I can automatically send this 'active source' command from kodi. And here is the patch. Probably wrong way to do it but it is working. From kodi log after resume
Quote
17:58:07 T:2740974496 DEBUG: CecCommand: got 'Active Source' command from TV, let's call CECActivateSource
17:58:07 T:3032768512 DEBUG: ToggleDeviceState - waking up CEC device...
But I also noticed that after first boot or reboot cec doesn't always work. So there should be something else wrong. And only tested on my imx6 system + Samsung UE40JU6090.
Update: I was informed that this patch will not be good. When watching for example DVB then after suspend/resume input will be switched to kodi 