usb: typec: tcpm: Use new Type-C switch/mux and usb-role-switch functions

Remove the unused (not implemented anywhere) tcpc_mux_dev abstraction
and replace it with calling the new typec_set_orientation,
usb_role_switch_set and typec_set_mode functions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Hans de Goede
2018-03-20 15:57:07 +03:00
committed by Greg Kroah-Hartman
parent c6962c2972
commit 2000016c94
4 changed files with 36 additions and 22 deletions

View File

@@ -16,7 +16,6 @@
#define __LINUX_USB_TCPM_H
#include <linux/bitops.h>
#include <linux/usb/role.h>
#include <linux/usb/typec.h>
#include "pd.h"
@@ -113,14 +112,6 @@ enum tcpc_mux_mode {
TCPC_MUX_DP_ENABLED,
};
struct tcpc_mux_dev {
int (*set)(struct tcpc_mux_dev *dev, enum tcpc_mux_mode mux_mode,
enum usb_role usb_role,
enum typec_cc_polarity polarity);
bool dfp_only;
void *priv_data;
};
/**
* struct tcpc_dev - Port configuration and callback functions
* @config: Pointer to port configuration
@@ -172,7 +163,6 @@ struct tcpc_dev {
int (*try_role)(struct tcpc_dev *dev, int role);
int (*pd_transmit)(struct tcpc_dev *dev, enum tcpm_transmit_type type,
const struct pd_message *msg);
struct tcpc_mux_dev *mux;
};
struct tcpm_port;