summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2017-05-09 09:04:57 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-15 11:23:56 +0200
commit931693f973507b320ecbdccd0ac3e786ddaf795f (patch)
treef7596b5731429e2324debd8723d166c743dca7ea
parent5fec4b54d0bf6c3eeb176b624ce50d6aef4819c0 (diff)
downloadlinux-931693f973507b320ecbdccd0ac3e786ddaf795f.tar.gz
linux-931693f973507b320ecbdccd0ac3e786ddaf795f.tar.bz2
linux-931693f973507b320ecbdccd0ac3e786ddaf795f.zip
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 <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>
-rw-r--r--drivers/staging/typec/tcpm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/typec/tcpm.c b/drivers/staging/typec/tcpm.c
index c5d8b129c4f4..a385f7e2a6fd 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;