usb: pd: Avoid dual_role_instance_changed() if nothing changed
We call this notifier on the dual_role_usb class instance to
report any changes in state such as data role and power role.
But if we are already in explicit contract and return to either
PE_SRC_Ready or PE_SNK_Ready states, then that means the power
role has not changed, so there is no need to update the dual_role
instance. This will avoid a 2 second system wakeup timer which
will delay allowing the system to suspend.
Change-Id: I0ba6dc8903b7a010735be4e73e609e7aefa19d96
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment