• Octavian Purdila's avatar
    mfd: dln2: Add suspend/resume functionality · 3daa122d
    Octavian Purdila authored
    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: default avatarOctavian Purdila <octavian.purdila@intel.com>
    Reviewed-by: default avatarJohan Hovold <johan@kernel.org>
    Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
    3daa122d
dln2.c 18.1 KB