From: Guenter Roeck Date: Tue, 9 May 2017 16:04:57 +0000 (-0700) Subject: staging: typec: tcpm: Set correct flags in PD request messages X-Git-Tag: v5.15~11254^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=931693f973507b320ecbdccd0ac3e786ddaf795f;p=platform%2Fkernel%2Flinux-starfive.git staging: typec: tcpm: Set correct flags in PD request messages 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 Cc: Yueyao Zhu Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c index c5d8b12..a385f7e 100644 --- a/drivers/staging/typec/tcpm.c +++ b/drivers/staging/typec/tcpm.c @@ -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;