This seems to fix random lags.
Delay brightness set if screen not on. Rearrange screen init.
Added arbitrary sleep in panel init to mostly fix wake-up issue.
Also avoid locking when screen is not initiliazed and userspace request backlight change. This seems to fix most of the screen wake up fails.
Update cable status when fsa9480 IRQ is fired. Call cable_status_update in battery code from there. Remove fsa9480 register reading from battery code, as last cable status is available. Also remove extra calls to cable_status_update. Clean up battery code.
Remove profiling and PM debug.
It happends that wake_lock is not released so add a timeout to avoid sleep issue.
This should fix mddi issue when fast switching of screen power. This seems to fix screen noise on resume.