summaryrefslogtreecommitdiff
path: root/include/linux/usb/typec.h
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <badhri@google.com>2017-05-30 12:39:53 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-03 18:02:58 +0900
commitbab3548078237706f53baafe43ae58257225549d (patch)
tree4fc0dc90f6eb3393885c0bae536502ca0c29bac1 /include/linux/usb/typec.h
parent7ee4ce6e933fbb2e5db2c39977b847704589575e (diff)
usb: typec: Add a sysfs node to manage port type
User space applications in some cases have the need to enforce a specific port type(DFP/UFP/DRP). This change allows userspace to attempt setting the desired port type. Low level drivers can however reject the request if the specific port type is not supported. 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>
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 d1d2ebcf36ec..ffe7487886ca 100644
--- a/include/linux/usb/typec.h
+++ b/include/linux/usb/typec.h
@@ -190,6 +190,7 @@ struct typec_partner_desc {
* @pr_set: Set Power Role
* @vconn_set: Set VCONN Role
* @activate_mode: Enter/exit given Alternate Mode
+ * @port_type_set: Set port type
*
* Static capabilities of a single USB Type-C port.
*/
@@ -214,6 +215,9 @@ struct typec_capability {
int (*activate_mode)(const struct typec_capability *,
int mode, int activate);
+ int (*port_type_set)(const struct typec_capability *,
+ enum typec_port_type);
+
};
/* Specific to try_role(). Indicates the user want's to clear the preference. */