ti-st: fix chip_asleep/awake & wake-ack everytime

chip_awake platform hook needs to be invoked from TI shared transport driver
when both the chip sends wake-indication intending to wake up and also when
host intends to wake up the chip.
Also, fix the function parameters sent across in these platform hooks,
although the parameters are for purely for future reference & currently not
made use of.

This patch also sends across wake acknowlegment even when there is a collision
of wake-indication, since this is pretty much ignored by the chip.
However, this is useful when UART for varying reasons drops the wake-ack &
chip retries the wake-indication.

Change-Id: I690247afb80eb1aca24f79feaaddce85d8473a05
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
ti-st: use msleep_interruptible instead of mdelay

Be nice to CPU and use msleep_interruptible instead of msleep which chops the
CPU up into a spin loop.
Used for all delays > 20ms.

Change-Id: I8f84ff34d9191e8fde9af28f81681470571c0b51
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers: misc: ti-st: Add missing carriage returns in print-functions calls

Due to missing carriage returns in print-functions calls
sometimes it's hard to read kernel log.
Fix this so now kernel log reading is more easy.

Change-Id: I0fa89456d299437666d13b23cdc167bf31c738a9
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
drivers:misc:ti-st: protect against bad packets

We encounter situations where we got bad packet type from the
UART (probably due to platform problem or UART driver issues)
which caused us out of boundary array access,
which eventually led to kernel panic.

Ported from:
	p-android-omap-3.0:89b502674ca [Amir Ayun <amira@ti.com>]

Change-Id: I6f0f13168c69e46260c5abb7d7c0b854c61cab7d
Signed-off-by: Amir Ayun <amira@ti.com>
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Leonid Iziumtsev <x0153368@ti.com>