usb: typec: mux: intel_pmc_mux: Add retry logic to a PMC command
authorTanveer Alam <tanveer1.alam@intel.com>
Mon, 28 Mar 2022 10:51:37 +0000 (16:21 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Apr 2022 16:28:00 +0000 (18:28 +0200)
commit38c695e1e2a2caaacb3b2dc5cddbba5e8024412f
treeef123684faebc795c585c4e17d3f8deacb491fdf
parentaef11279888c00e1841a3533a35d279285af3a51
usb: typec: mux: intel_pmc_mux: Add retry logic to a PMC command

There are few scenerio when PMC reports 'busy condition' and command
fail.

If PMC receives a high priority command while servicing a low priority
command then it discards the low priority command and start servicing
the high priority command. The lower priority command fail and driver
returns error. If the same command resend to the PMC then PMC latches
the command and service it accordingly.

Thus adds the retry logic for the PMC command.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Tanveer Alam <tanveer1.alam@intel.com>
Link: https://lore.kernel.org/r/20220328105137.6223-1-tanveer1.alam@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/intel_pmc_mux.c