staging: typec: tcpm: Report right typec_pwr_opmode
authorBadhri Jagan Sridharan <badhri@google.com>
Tue, 15 Aug 2017 23:22:13 +0000 (16:22 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Aug 2017 22:57:16 +0000 (15:57 -0700)
commitfce042f02ef03c5d05fc33b692133e2ed0b9dc18
tree04d26ada761a5ab06ef4bb53ac098ebeec884341
parentc79d92bda80c09c9d8d0d6b60ed0dd8408e1a4f7
staging: typec: tcpm: Report right typec_pwr_opmode

At present, TCPM does not take into account the actual resistor
value presented in the CC line and therefore reports TYPEC_PWR_MODE_USB
irrespective of the power_op_mode it is in.
This patch makes TCPM consider the actual value of Rp.

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/typec/tcpm.c