summaryrefslogtreecommitdiff
path: root/include/linux/usb/typec.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-11-04 17:24:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-04 16:03:33 +0100
commit8c127a42af89c39560a8c5bd5accadaaa5741f8c (patch)
tree2b762979727bcd4ff0383b7cddd357489136d216 /include/linux/usb/typec.h
parentad772c39b2fbb24ff6104d73d14fc125d8f02711 (diff)
usb: typec: Introduce typec_get_drvdata()
Leaving the private driver_data pointer of the port device to the port drivers. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20191104142435.29960-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/typec.h')
-rw-r--r--include/linux/usb/typec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/usb/typec.h b/include/linux/usb/typec.h
index 7df4ecabc78a..8b90cd77331c 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -179,6 +179,7 @@ struct typec_partner_desc {
* @sw: Cable plug orientation switch
* @mux: Multiplexer switch for Alternate/Accessory Modes
* @fwnode: Optional fwnode of the port
+ * @driver_data: Private pointer for driver specific info
* @try_role: Set data role preference for DRP port
* @dr_set: Set Data Role
* @pr_set: Set Power Role
@@ -198,6 +199,7 @@ struct typec_capability {
struct typec_switch *sw;
struct typec_mux *mux;
struct fwnode_handle *fwnode;
+ void *driver_data;
int (*try_role)(const struct typec_capability *,
int role);
@@ -241,6 +243,8 @@ int typec_set_orientation(struct typec_port *port,
enum typec_orientation typec_get_orientation(struct typec_port *port);
int typec_set_mode(struct typec_port *port, int mode);
+void *typec_get_drvdata(struct typec_port *port);
+
int typec_find_port_power_role(const char *name);
int typec_find_power_role(const char *name);
int typec_find_port_data_role(const char *name);