diff options
author | Prashant Malani <pmalani@chromium.org> | 2020-11-05 18:03:05 -0800 |
---|---|---|
committer | Benson Leung <bleung@chromium.org> | 2020-12-10 13:05:16 -0800 |
commit | 6ae9b5ffcaeba64c290dfb8bd7b0194b1fdf0c92 (patch) | |
tree | a404cf27f67b19c230ad77c976725a5fec924ead /drivers/platform/chrome/cros_ec_typec.c | |
parent | de0f49487db3667f5204dcec6d3482c9bd1a0a30 (diff) | |
download | linux-stable-6ae9b5ffcaeba64c290dfb8bd7b0194b1fdf0c92.tar.gz linux-stable-6ae9b5ffcaeba64c290dfb8bd7b0194b1fdf0c92.tar.bz2 linux-stable-6ae9b5ffcaeba64c290dfb8bd7b0194b1fdf0c92.zip |
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
Diffstat (limited to 'drivers/platform/chrome/cros_ec_typec.c')
-rw-r--r-- | drivers/platform/chrome/cros_ec_typec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index ce031a10eb1b..5b8db02ab84a 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -537,10 +537,9 @@ static int cros_typec_configure_mux(struct cros_typec_data *typec, int port_num, port->state.mode = TYPEC_STATE_USB; ret = typec_mux_set(port->mux, &port->state); } else { - dev_info(typec->dev, - "Unsupported mode requested, mux flags: %x\n", - mux_flags); - ret = -ENOTSUPP; + dev_dbg(typec->dev, + "Unrecognized mode requested, mux flags: %x\n", + mux_flags); } return ret; |