mfd: dln2: Add suspend/resume functionality
authorOctavian Purdila <octavian.purdila@intel.com>
Mon, 19 Jan 2015 11:51:36 +0000 (13:51 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 22 Jan 2015 15:56:01 +0000 (15:56 +0000)
commit3daa122d6b710762aff5fa6aae534ed7cc45c2d6
tree603f21f381dd8f8a10379ff4e8a5e31e6c3d2059
parentee231aeed9dc43f3755a3d654fb3bafcb11d4e88
mfd: dln2: Add suspend/resume functionality

Without suspend/resume functionality in the USB driver the USB core
will disconnect and reconnect the DLN2 port and because the GPIO
framework does not yet support removal of an in-use controller a
suspend/resume operation will result in a crash.

This patch provides suspend and resume functions for the DLN2 driver
so that the above scenario is avoided, if the host controller does not
drop VBUS during suspend, since in this case the device state is
preserved.

We chose not implemented reset_resume so that if the host controller
does drop VBUS the resume path will go through above the
disconnect/reconnect process since it is probably better to fix the
GPIO framework disconnect issue then to save and restore the device
state for every driver.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/dln2.c