greybus: arche-platform: Make sure APB power cycles on coldboot
authorVaibhav Hiremath <vaibhav.hiremath@linaro.org>
Thu, 25 Feb 2016 11:15:44 +0000 (16:45 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 26 Feb 2016 00:28:17 +0000 (16:28 -0800)
commitff788de0b41b960d7b4a650e167cfcc0d3f63644
tree68c7bab1a068601b929906e2a2a85fe9f1d68781
parent7e43e337a524eb5ceab2cda9bbf882c35074bcc2
greybus: arche-platform: Make sure APB power cycles on coldboot

On first wake/detect pulse, everything works fine, as APB would be
in poweroff state initially.
But on subsequent wake/detect pulses, where APB is already in active
state, internal function just returns doing nothing, as it finds that
device is already in active state.

So the solution would be to make sure that, whenever execution reaches
to coldboot, make sure we power cycle it. Power off first, before
powering on.

Interrupt handler takes care of ignoring < 30msec pulses, so we should
be safe here to power cycle APB.

Testing Done: Testd on DB3.5 platform.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-platform.c