]> Git Repo - linux.git/commitdiff
platform/chrome: cros_ec_typec: Tolerate unrecognized mux flags
authorPrashant Malani <[email protected]>
Fri, 6 Nov 2020 02:03:05 +0000 (18:03 -0800)
committerBenson Leung <[email protected]>
Thu, 10 Dec 2020 21:05:16 +0000 (13:05 -0800)
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 <[email protected]>
Signed-off-by: Prashant Malani <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Benson Leung <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/platform/chrome/cros_ec_typec.c

index ce031a10eb1b3188c97ac3929bffcad728114302..5b8db02ab84a9e93856473ee4d8b06c333c21662 100644 (file)
@@ -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;
This page took 0.064976 seconds and 4 git commands to generate.