mfd: fusb302: avoid sending notifier to USB/DP during PM suspend
authorWilliam Wu <wulf@rock-chips.com>
Wed, 4 Jan 2017 08:05:21 +0000 (16:05 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 6 Jan 2017 10:27:36 +0000 (18:27 +0800)
commit082f43af91698a82583053679ec0d0be89b36b2d
tree6ef927ee43f9606d4b64267e070991f538d5c325
parent1aba3144fc221a7f509e5ecf02e396ee0f9d183c
mfd: fusb302: avoid sending notifier to USB/DP during PM suspend

When system enter PM suspend, it will use a flag genpd->suspend_
power_off to disable device power domain operations, and device
can't enable its power domain until complete PM resume, or rather,
until call pm_genpd_complete() to clear suspend_power_off flag.

In some case, e.g. plug in Type-C PD adapter during system suspend,
and then wakeup system, the fusb302 may send notifier to USB/DP
before USB/DP complete PM resume, this may cause USB/DP fail to
enable their power domain.

I don't find a way to make sure USB/DP PM resume, fortunately,
the PM framework provides a flag pm_freezing to indicate that
complete PM resume all of devices.

Change-Id: I5c9a467691956250c1fa99b7a83f5fe306c0730a
Signed-off-by: William Wu <wulf@rock-chips.com>
drivers/mfd/fusb302.c