staging: typec: tcpm: set port type callback
authorBadhri Jagan Sridharan <badhri@google.com>
Mon, 28 Aug 2017 17:23:12 +0000 (10:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Aug 2017 06:21:10 +0000 (08:21 +0200)
commit9b0ae69909c2813e61f5c747a1508497ce35d71b
tree840d448711ec1d91cb9c363572a5c19656f9abd8
parenta033c3b10a2bec387ccd9e39fadd94eef6519626
staging: typec: tcpm: set port type callback

The port type callback call enquires the tcpc_dev if
the requested port type is supported. If supported, then
performs a tcpm reset if required after setting the tcpm
internal port_type variable.

Check against the tcpm port_type instead of checking
against caps.type as port_type reflects the current
configuration.

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