]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags
authorPrashant Malani <pmalani@chromium.org>
Fri, 6 Nov 2020 02:03:05 +0000 (18:03 -0800)
committerBenson Leung <bleung@chromium.org>
Thu, 10 Dec 2020 21:05:16 +0000 (13:05 -0800)
commit4bfe9f4caca32d3c0c386a48395e08e99f70221f
treea404cf27f67b19c230ad77c976725a5fec924ead
parenta1c55e60a874a345676f8b0698eb81eac85b2abe
platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags

On occasion, the Chrome Embedded Controller (EC) can send a mux
configuration which doesn't map to a particular data mode. For instance,
dedicated Type C chargers, when connected, may cause only
USB_PD_MUX_POLARITY_INVERTED to be set. This is a valid flag combination
and should not lead to a driver abort.

Modify the mux configuration handling to not return an error when an
unrecognized mux flag combination is encountered. Concordantly, make the
ensuing print a debug level print so as to not pollute the kernel logs.

Cc: Keith Short <keithshort@chromium.org>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Benson Leung <bleung@chromium.org>
Link: https://lore.kernel.org/r/20201106020305.767202-1-pmalani@chromium.org
drivers/platform/chrome/cros_ec_typec.c