msm: camera: Handle sensor shutdown using state machine

In case of user space application crash, v4l2 subdevices are closed
where close call routine shall take care of releasing resources. Add
state machine to make sure sensor power down is done only if it is
in power up state. Use this state machine to make sure i2c transaction
is performed only if sensor is already powerd up.

Change-Id: I593c6c6a97fee1b3afcc37e191e4e0fb7a2bb5b9
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
2 files changed