staging: typec: tcpm: Set correct flags in PD request messages
authorGuenter Roeck <linux@roeck-us.net>
Tue, 9 May 2017 16:04:57 +0000 (09:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 May 2017 09:23:56 +0000 (11:23 +0200)
We do support USB PD communication, and devices supported by this driver
typically use USB power for purposes other than USB communication.

Originally-from: Puma Hsu <puma_hsu@htc.com>
Cc: Yueyao Zhu <yueyao.zhu@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/tcpm.c

index c5d8b129c4f492b1b312ac31e02ac77679d9c60d..a385f7e2a6fd268793bc71f103cde50250299194 100644 (file)
@@ -1738,8 +1738,7 @@ static int tcpm_pd_build_request(struct tcpm_port *port, u32 *rdo)
        }
        ma = min(ma, port->max_snk_ma);
 
-       /* XXX: Any other flags need to be set? */
-       flags = 0;
+       flags = RDO_USB_COMM | RDO_NO_SUSPEND;
 
        /* Set mismatch bit if offered power is less than operating power */
        mw = ma * mv / 1000;